From: Junio C Hamano Date: Fri, 5 Dec 2014 19:39:25 +0000 (-0800) Subject: Merge branch 'tq/git-ssh-command' X-Git-Tag: v2.3.0-rc0~101 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/09d60d785c68c8fa65094ecbe46fbc2a38d0fc1f?hp=-c Merge branch 'tq/git-ssh-command' Allow passing extra set of arguments when ssh is invoked to create an encrypted & authenticated connection by introducing a new environment variable GIT_SSH_COMMAND, whose contents is interpreted by shells. This is not possible with existing GIT_SSH mechanism whose invocation bypasses shells, which was designed more to match what other programs with similar variables did, not necessarily to be more useful. * tq/git-ssh-command: git_connect: set ssh shell command in GIT_SSH_COMMAND --- 09d60d785c68c8fa65094ecbe46fbc2a38d0fc1f diff --combined Documentation/git.txt index afb48d39bb,6a25ba370a..dd172548f3 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@@ -43,11 -43,6 +43,11 @@@ unreleased) version of Git, that is ava branch of the `git.git` repository. Documentation for older releases are available here: +* link:v2.2.0/git.html[documentation for release 2.2] + +* release notes for + link:RelNotes/2.2.0.txt[2.2]. + * link:v2.1.3/git.html[documentation for release 2.1.3] * release notes for @@@ -881,19 -876,21 +881,21 @@@ othe 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