LinuxCommandLibrary

git-http-fetch

Download objects over HTTP or HTTPS

SYNOPSIS

git-http-fetch [--verbose] [--no-verbose] [--depth ] [--no-progress] [--pack-progress ] [--recover] [--auto-follow-redirects] [--no-auto-follow-redirects] [--http-variant ] [--http-no-wire-format] [--negotiation-tip ] [--stdin]

PARAMETERS

--verbose
    Be verbose.

--no-verbose
    Turn off verbose reporting.

--depth
    Limit fetching to specified number of commits from the tip of each remote branch history.

--no-progress
    Do not show progress meter on stderr.

--pack-progress
    Show progress meter on stderr with a specified message.

--recover
    Try to recover a broken transfer.

--auto-follow-redirects
    Automatically follow HTTP redirects.

--no-auto-follow-redirects
    Do not automatically follow HTTP redirects.

--http-variant
    Use the specified HTTP variant.

--http-no-wire-format
    Do not use the wire format (for debugging).

--negotiation-tip
    Pass a tip OID to the negotiation phase.

--stdin
    Read the list of refs to fetch from standard input.


    The URL of the remote repository.


    The directory to store fetched objects.

DESCRIPTION

The `git-http-fetch` command is a helper program used by Git to fetch objects from a remote repository over HTTP or HTTPS. It's typically invoked internally by `git fetch`, `git clone`, and other Git commands that need to communicate with remote repositories. It handles the network communication, object negotiation, and data transfer required to download pack files and loose objects from the remote server. It utilizes the HTTP protocol (or HTTPS for secure communication) to interact with the remote Git server. `git-http-fetch` is designed to work with Git's smart HTTP protocol, which allows for efficient object transfer and reduces network overhead.

Users typically don't interact with `git-http-fetch` directly. Instead, they use higher-level Git commands like `git fetch` or `git clone`, which internally call `git-http-fetch` as needed. The command automatically authenticates with the remote repository if required, using credentials stored in the Git configuration or provided through other means (e.g., SSH agent forwarding, credential helpers). It also supports various HTTP features, such as proxies, redirects, and authentication schemes. It's a crucial part of the Git network layer, enabling seamless interaction with remote Git repositories over the internet.

CAVEATS

This command is typically not invoked directly by users. It's intended for internal use by Git commands like `git fetch` and `git clone`.

DEBUGGING

The `--verbose` and `--http-no-wire-format` options are helpful for debugging issues with HTTP object fetching.

CREDENTIALS

Authentication is handled through the `git-credential` system.

Consult the git documentation to configure credential storage.

HISTORY

The `git-http-fetch` command was developed as part of the Git project to provide a reliable and efficient way to fetch objects from remote repositories over HTTP(S). It was introduced to handle the specific challenges of communicating with remote servers using the HTTP protocol, including authentication, redirects, and object negotiation. Over time, it has been refined to support various HTTP features and improve performance.

SEE ALSO

Copied to clipboard