Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 1 | git-remote-ext(1) |
| 2 | ================= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-remote-ext - Bridge smart transport to external command. |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 10 | [verse] |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 11 | git remote add <nick> "ext::<command>[ <arguments>...]" |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 15 | This remote helper uses the specified '<command>' to connect |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 16 | to a remote Git server. |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 17 | |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 18 | Data written to stdin of the specified '<command>' is assumed |
Junio C Hamano | 7165bf7 | 2011-01-04 22:06:18 | [diff] [blame] | 19 | to be sent to a git:// server, git-upload-pack, git-receive-pack |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 20 | or git-upload-archive (depending on situation), and data read |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 21 | from stdout of <command> is assumed to be received from |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 22 | the same service. |
| 23 | |
Junio C Hamano | 7165bf7 | 2011-01-04 22:06:18 | [diff] [blame] | 24 | Command and arguments are separated by an unescaped space. |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 25 | |
| 26 | The following sequences have a special meaning: |
| 27 | |
| 28 | '% ':: |
| 29 | Literal space in command or argument. |
| 30 | |
| 31 | '%%':: |
| 32 | Literal percent sign. |
| 33 | |
| 34 | '%s':: |
| 35 | Replaced with name (receive-pack, upload-pack, or |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 36 | upload-archive) of the service Git wants to invoke. |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 37 | |
| 38 | '%S':: |
| 39 | Replaced with long name (git-receive-pack, |
| 40 | git-upload-pack, or git-upload-archive) of the service |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 41 | Git wants to invoke. |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 42 | |
Junio C Hamano | 7165bf7 | 2011-01-04 22:06:18 | [diff] [blame] | 43 | '%G' (must be the first characters in an argument):: |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 44 | This argument will not be passed to '<command>'. Instead, it |
Junio C Hamano | 7165bf7 | 2011-01-04 22:06:18 | [diff] [blame] | 45 | will cause the helper to start by sending git:// service requests to |
| 46 | the remote side with the service field set to an appropriate value and |
| 47 | the repository field set to rest of the argument. Default is not to send |
| 48 | such a request. |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 49 | + |
| 50 | This is useful if remote side is git:// server accessed over |
| 51 | some tunnel. |
| 52 | |
| 53 | '%V' (must be first characters in argument):: |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 54 | This argument will not be passed to '<command>'. Instead it sets |
Junio C Hamano | 7165bf7 | 2011-01-04 22:06:18 | [diff] [blame] | 55 | the vhost field in the git:// service request (to rest of the argument). |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 56 | Default is not to send vhost in such request (if sent). |
| 57 | |
| 58 | ENVIRONMENT VARIABLES: |
| 59 | ---------------------- |
| 60 | |
| 61 | GIT_TRANSLOOP_DEBUG:: |
| 62 | If set, prints debugging information about various reads/writes. |
| 63 | |
| 64 | ENVIRONMENT VARIABLES PASSED TO COMMAND: |
| 65 | ---------------------------------------- |
| 66 | |
| 67 | GIT_EXT_SERVICE:: |
| 68 | Set to long name (git-upload-pack, etc...) of service helper needs |
| 69 | to invoke. |
| 70 | |
| 71 | GIT_EXT_SERVICE_NOPREFIX:: |
| 72 | Set to long name (upload-pack, etc...) of service helper needs |
| 73 | to invoke. |
| 74 | |
| 75 | |
| 76 | EXAMPLES: |
| 77 | --------- |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 78 | This remote helper is transparently used by Git when |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 79 | you use commands such as "git fetch <URL>", "git clone <URL>", |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 80 | , "git push <URL>" or "git remote add <nick> <URL>", where <URL> |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 81 | begins with `ext::`. Examples: |
| 82 | |
| 83 | "ext::ssh -i /home/foo/.ssh/somekey user@host.example %S 'foo/repo'":: |
| 84 | Like host.example:foo/repo, but use /home/foo/.ssh/somekey as |
| 85 | keypair and user as user on remote side. This avoids needing to |
| 86 | edit .ssh/config. |
| 87 | |
| 88 | "ext::socat -t3600 - ABSTRACT-CONNECT:/git-server %G/somerepo":: |
Junio C Hamano | a080bc3 | 2013-04-12 21:33:01 | [diff] [blame] | 89 | Represents repository with path /somerepo accessible over |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 90 | git protocol at abstract namespace address /git-server. |
| 91 | |
| 92 | "ext::git-server-alias foo %G/repo":: |
| 93 | Represents a repository with path /repo accessed using the |
| 94 | helper program "git-server-alias foo". The path to the |
| 95 | repository and type of request are not passed on the command |
| 96 | line but as part of the protocol stream, as usual with git:// |
| 97 | protocol. |
| 98 | |
| 99 | "ext::git-server-alias foo %G/repo %Vfoo":: |
| 100 | Represents a repository with path /repo accessed using the |
| 101 | helper program "git-server-alias foo". The hostname for the |
| 102 | remote server passed in the protocol stream will be "foo" |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 103 | (this allows multiple virtual Git servers to share a |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 104 | link-level address). |
| 105 | |
| 106 | "ext::git-server-alias foo %G/repo% with% spaces %Vfoo":: |
| 107 | Represents a repository with path '/repo with spaces' accessed |
| 108 | using the helper program "git-server-alias foo". The hostname for |
| 109 | the remote server passed in the protocol stream will be "foo" |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 110 | (this allows multiple virtual Git servers to share a |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 111 | link-level address). |
| 112 | |
| 113 | "ext::git-ssl foo.example /bar":: |
| 114 | Represents a repository accessed using the helper program |
| 115 | "git-ssl foo.example /bar". The type of request can be |
| 116 | determined by the helper using environment variables (see |
| 117 | above). |
| 118 | |
Junio C Hamano | 1322024 | 2014-11-19 23:06:27 | [diff] [blame] | 119 | SEE ALSO |
| 120 | -------- |
| 121 | linkgit:gitremote-helpers[1] |
| 122 | |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 123 | GIT |
| 124 | --- |
| 125 | Part of the linkgit:git[1] suite |