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