Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions book/10-git-internals/sections/environment.asc
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,11 @@ nothing to commit, working directory clean

*`GIT_SSH`*, if specified, is a program that is invoked instead of `ssh` when Git tries to connect to an SSH host.
It is invoked like `$GIT_SSH [username@]host [-p <port>] <command>`.
Note that this isn't the easiest way to customize how `ssh` is invoked; it won't support extra command-line parameters, so you'd have to write a wrapper script and set `GIT_SSH` to point to it.
It's probably easier just to use the `~/.ssh/config` file for that.
Note that this isn't the easiest way to customize how `ssh` is invoked; it won't support extra command-line parameters.
To support extra command-line parameters, you can use *`GIT_SSH_COMMAND`*, write a wrapper script and set `GIT_SSH` to point to it or use the `~/.ssh/config` file.

*`GIT_SSH_COMMAND`* sets the SSH command used when Git tries to connect to an SSH host.
The command is interpreted by the shell, and extra command-line arguments can be used with `ssh`, such as `GIT_SSH_COMMAND="ssh -i ~/.ssh/my_key" git clone git@example.com:my/repo`.

*`GIT_ASKPASS`* is an override for the `core.askpass` configuration value.
This is the program invoked whenever Git needs to ask the user for credentials, which can expect a text prompt as a command-line argument, and should return the answer on `stdout` (see <<ch07-git-tools#_credential_caching>> for more on this subsystem).
Expand Down