17 ,;lzmJeAqţ 4_I|?;gitremote-helpers(1) ==================== NAME ---- gitremote-helpers - Helper programs to interact with remote repositories SYNOPSIS -------- [verse] 'git remote-' [] DESCRIPTION ----------- Remote helper programs are normally not used directly by end users, but they are invoked by Git when it needs to interact with remote repositories Git does not support natively. A given helper will implement a subset of the capabilities documented here. When Git needs to interact with a repository using a remote helper, it spawns the helper as an independent process, sends commands to the helper's standard input, and expects results from the helper's standard output. Because a remote helper runs as an independent process from Git, there is no need to re-link Git to add a new helper, nor any need to link the helper with the implementation of Git. Every helper must support the "capabilities" command, which Git uses to determine what other commands the helper will accept. Those other commands can be used to discover and update remote refs, transport objects between the object database and the remote repository, and update the local object store. Git comes with a "curl" family of remote helpers, that handle various transport protocols, such as 'git-remote-http', 'git-remote-https', 'git-remote-ftp' and 'git-remote-ftps'. They implement the capabilities 'fetch', 'option', and 'push'. INVOCATION ---------- Remote helper programs are invoked with one or (optionally) two arguments. The first argument specifies a remote repository as in Git; it is either the name of a configured remote or a URL. The second argument specifies a URL; it is usually of the form '://
', but any arbitrary string is possible. The 'GIT_DIR' environment variable is set up for the remote helper and can be used to determine where to store additional data or from which directory to invoke auxiliary Git commands. When Git encounters a URL of the form '://
', where '' is a protocol that it cannot handle natively, it automatically invokes 'git remote-' with the full URL as the second argument. If such a URL is encountered directly on the command line, the first argument is the same as the second, and if it is encountered in a configured remote, the first argument is the name of that remote. A URL of the form '::
' explicitly instructs Git to invoke 'git remote-' with '
' as the second argument. If such a URL is encountered directly on the command line, the first argument is '
', and if it is encountered in a configured remote, the first argument is the name of that remote. Additionally, when a configured remote has 'remote..vcs' set to '', Git explicitly invokes 'git remote-' with '' as the first argument. If set, the second argument is 'remote..url'; otherwise, the second argument is omitted. INPUT FORMAT ------------ Git sends the remote helper a list of commands on standard input, one per line. The first command is always the 'capabilities' command, in response to which the remote helper must print a list of the capabilities it supports (see below) followed by a blank line. The response to the capabilities command determines what commands Git uses in the remainder of the command stream. The command stream is terminated by a blank line. In some cases (indicated in the documentation of the relevant commands), this blank line is followed by a payload in some other protocol (e.g., the pack protocol), while in others it indicates the end of input. Capabilities ~~~~~~~~~~~~ Each remote helper is expected to support only a subset of commands. The operations a helper supports are declared to Git in the response to the `capabilities` command (see COMMANDS, below). In the following, we list all defined capabilities and for each we list which commands a helper with that capability must provide. Capabilities for Pushing ^^^