summaryrefslogtreecommitdiff
path: root/Documentation/git.txt
diff options
context:
space:
mode:
authorThomas Quinot <thomas@quinot.org>2014-11-09 22:42:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-11-10 16:55:10 (GMT)
commit39942766ab9bc738f49f93d4c8ea68ffbaadc305 (patch)
treedf0269061d591a451060a9f6587763e451b25627 /Documentation/git.txt
parent66edfe9ddc29102fa39edd37f9aecccbaca6a013 (diff)
downloadgit-39942766ab9bc738f49f93d4c8ea68ffbaadc305.zip
git-39942766ab9bc738f49f93d4c8ea68ffbaadc305.tar.gz
git-39942766ab9bc738f49f93d4c8ea68ffbaadc305.tar.bz2
git_connect: set ssh shell command in GIT_SSH_COMMAND
It may be impractical to install a wrapper script for GIT_SSH when additional parameters need to be passed. Provide an alternative way of specifying a shell command to be run, including command line arguments, by means of the GIT_SSH_COMMAND environment variable, which behaves like GIT_SSH but is passed to the shell. The special circuitry to modify parameters in the case of using PuTTY's plink/tortoiseplink is activated only when using GIT_SSH; in the case of using GIT_SSH_COMMAND, it is deliberately left up to the user to make any required parameters adaptation before calling the underlying ssh implementation. Signed-off-by: Thomas Quinot <thomas@quinot.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git.txt')
-rw-r--r--Documentation/git.txt26
1 files changed, 14 insertions, 12 deletions
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 9202010..6a25ba3 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -876,19 +876,21 @@ other
and the `core.editor` option in linkgit:git-config[1].
'GIT_SSH'::
- If this environment variable is set then 'git fetch'
- and 'git push' will use this command instead
- of 'ssh' when they need to connect to a remote system.
- The '$GIT_SSH' command will be given exactly two or
- four arguments: the 'username@host' (or just 'host')
- from the URL and the shell command to execute on that
- remote system, optionally preceded by '-p' (literally) and
- the 'port' from the URL when it specifies something other
- than the default SSH port.
+'GIT_SSH_COMMAND'::
+ If either of these environment variables is set then 'git fetch'
+ and 'git push' will use the specified command instead of 'ssh'
+ when they need to connect to a remote system.
+ The command will be given exactly two or four arguments: the
+ 'username@host' (or just 'host') from the URL and the shell
+ command to execute on that remote system, optionally preceded by
+ '-p' (literally) and the 'port' from the URL when it specifies
+ something other than the default SSH port.
+
-To pass options to the program that you want to list in GIT_SSH
-you will need to wrap the program and options into a shell script,
-then set GIT_SSH to refer to the shell script.
+`$GIT_SSH_COMMAND` takes precedence over `$GIT_SSH`, and is interpreted
+by the shell, which allows additional arguments to be included.
+`$GIT_SSH` on the other hand must be just the path to a program
+(which can be a wrapper shell script, if additional arguments are
+needed).
+
Usually it is easier to configure any desired options through your
personal `.ssh/config` file. Please consult your ssh documentation