diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-06-10 13:46:30 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-06-10 13:46:30 +0200 |
commit | 539980d51c159cb9922d0631a2994835b4243808 (patch) | |
tree | 3c1c102c2cf7e701ed5cfe3b070b4193d69b9f0e | |
parent | 14851034ab5204ddb7329eb34bb0964d3f206f2b (diff) | |
parent | bafb4cc0a95428cbedaaa225abdceecee7533fac (diff) | |
download | gitpython-539980d51c159cb9922d0631a2994835b4243808.tar.gz |
Merge branch 'T0MASD-add_ssh_script_syntax'
-rw-r--r-- | doc/source/tutorial.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst index 632d2d0c..7cc296d8 100644 --- a/doc/source/tutorial.rst +++ b/doc/source/tutorial.rst @@ -343,6 +343,14 @@ This one sets a custom script to be executed in place of `ssh`, and can be used with repo.git.custom_environment(GIT_SSH=ssh_executable): repo.remotes.origin.fetch() +Here's an example executable that can be used in place of the `ssh_executable` above:: + + #!/bin/sh + ID_RSA=/var/lib/openshift/5562b947ecdd5ce939000038/app-deployments/id_rsa + exec /usr/bin/ssh -o StrictHostKeyChecking=no -i $ID_RSA "$@" + +Please note that the script must be executable (i.e. `chomd +x script.sh`). `StrictHostKeyChecking=no` is used to avoid prompts asking to save the hosts key to `~/.ssh/known_hosts`, which happens in case you run this as daemon. + You might also have a look at `Git.update_environment(...)` in case you want to setup a changed environment more permanently. Submodule Handling |