blob: b25d0b5996b560837648c13c742bfc5ad09f0310 [file] [log] [blame]
Junio C Hamano788eeba2010-12-08 22:50:431git-remote-ext(1)
2=================
3
4NAME
5----
6git-remote-ext - Bridge smart transport to external command.
7
8SYNOPSIS
9--------
Junio C Hamano15567bc2011-07-23 00:51:5910[verse]
Junio C Hamano63c2bc92011-02-28 06:41:2811git remote add <nick> "ext::<command>[ <arguments>...]"
Junio C Hamano788eeba2010-12-08 22:50:4312
13DESCRIPTION
14-----------
Junio C Hamano63c2bc92011-02-28 06:41:2815This remote helper uses the specified '<command>' to connect
Junio C Hamano076ffcc2013-02-06 05:13:2116to a remote Git server.
Junio C Hamano788eeba2010-12-08 22:50:4317
Junio C Hamano63c2bc92011-02-28 06:41:2818Data written to stdin of the specified '<command>' is assumed
Junio C Hamano7165bf72011-01-04 22:06:1819to be sent to a git:// server, git-upload-pack, git-receive-pack
Junio C Hamano788eeba2010-12-08 22:50:4320or git-upload-archive (depending on situation), and data read
Junio C Hamano63c2bc92011-02-28 06:41:2821from stdout of <command> is assumed to be received from
Junio C Hamano788eeba2010-12-08 22:50:4322the same service.
23
Junio C Hamano7165bf72011-01-04 22:06:1824Command and arguments are separated by an unescaped space.
Junio C Hamano788eeba2010-12-08 22:50:4325
26The following sequences have a special meaning:
27
28'% '::
29Literal space in command or argument.
30
31'%%'::
32Literal percent sign.
33
34'%s'::
35Replaced with name (receive-pack, upload-pack, or
Junio C Hamano076ffcc2013-02-06 05:13:2136upload-archive) of the service Git wants to invoke.
Junio C Hamano788eeba2010-12-08 22:50:4337
38'%S'::
39Replaced with long name (git-receive-pack,
40git-upload-pack, or git-upload-archive) of the service
Junio C Hamano076ffcc2013-02-06 05:13:2141Git wants to invoke.
Junio C Hamano788eeba2010-12-08 22:50:4342
Junio C Hamano7165bf72011-01-04 22:06:1843'%G' (must be the first characters in an argument)::
Junio C Hamano63c2bc92011-02-28 06:41:2844This argument will not be passed to '<command>'. Instead, it
Junio C Hamano7165bf72011-01-04 22:06:1845will cause the helper to start by sending git:// service requests to
46the remote side with the service field set to an appropriate value and
47the repository field set to rest of the argument. Default is not to send
48such a request.
Junio C Hamano788eeba2010-12-08 22:50:4349+
50This is useful if remote side is git:// server accessed over
51some tunnel.
52
53'%V' (must be first characters in argument)::
Junio C Hamano63c2bc92011-02-28 06:41:2854This argument will not be passed to '<command>'. Instead it sets
Junio C Hamano7165bf72011-01-04 22:06:1855the vhost field in the git:// service request (to rest of the argument).
Junio C Hamano788eeba2010-12-08 22:50:4356Default is not to send vhost in such request (if sent).
57
58ENVIRONMENT VARIABLES:
59----------------------
60
61GIT_TRANSLOOP_DEBUG::
62If set, prints debugging information about various reads/writes.
63
64ENVIRONMENT VARIABLES PASSED TO COMMAND:
65----------------------------------------
66
67GIT_EXT_SERVICE::
68Set to long name (git-upload-pack, etc...) of service helper needs
69to invoke.
70
71GIT_EXT_SERVICE_NOPREFIX::
72Set to long name (upload-pack, etc...) of service helper needs
73to invoke.
74
75
76EXAMPLES:
77---------
Junio C Hamano076ffcc2013-02-06 05:13:2178This remote helper is transparently used by Git when
Junio C Hamano788eeba2010-12-08 22:50:4379you use commands such as "git fetch <URL>", "git clone <URL>",
Junio C Hamano63c2bc92011-02-28 06:41:2880, "git push <URL>" or "git remote add <nick> <URL>", where <URL>
Junio C Hamano788eeba2010-12-08 22:50:4381begins with `ext::`. Examples:
82
83"ext::ssh -i /home/foo/.ssh/somekey user&#64;host.example %S 'foo/repo'"::
84Like host.example:foo/repo, but use /home/foo/.ssh/somekey as
85keypair and user as user on remote side. This avoids needing to
86edit .ssh/config.
87
88"ext::socat -t3600 - ABSTRACT-CONNECT:/git-server %G/somerepo"::
Junio C Hamanoa080bc32013-04-12 21:33:0189Represents repository with path /somerepo accessible over
Junio C Hamano788eeba2010-12-08 22:50:4390git protocol at abstract namespace address /git-server.
91
92"ext::git-server-alias foo %G/repo"::
93Represents a repository with path /repo accessed using the
94helper program "git-server-alias foo". The path to the
95repository and type of request are not passed on the command
96line but as part of the protocol stream, as usual with git://
97protocol.
98
99"ext::git-server-alias foo %G/repo %Vfoo"::
100Represents a repository with path /repo accessed using the
101helper program "git-server-alias foo". The hostname for the
102remote server passed in the protocol stream will be "foo"
Junio C Hamano076ffcc2013-02-06 05:13:21103(this allows multiple virtual Git servers to share a
Junio C Hamano788eeba2010-12-08 22:50:43104link-level address).
105
106"ext::git-server-alias foo %G/repo% with% spaces %Vfoo"::
107Represents a repository with path '/repo with spaces' accessed
108using the helper program "git-server-alias foo". The hostname for
109the remote server passed in the protocol stream will be "foo"
Junio C Hamano076ffcc2013-02-06 05:13:21110(this allows multiple virtual Git servers to share a
Junio C Hamano788eeba2010-12-08 22:50:43111link-level address).
112
113"ext::git-ssl foo.example /bar"::
114Represents a repository accessed using the helper program
115"git-ssl foo.example /bar". The type of request can be
116determined by the helper using environment variables (see
117above).
118
Junio C Hamano13220242014-11-19 23:06:27119SEE ALSO
120--------
121linkgit:gitremote-helpers[1]
122
Junio C Hamano788eeba2010-12-08 22:50:43123GIT
124---
125Part of the linkgit:git[1] suite