summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-04-08 15:05:23 +0200
committerSebastian Thiel <byronimo@gmail.com>2015-04-08 15:05:33 +0200
commit545ac2574cfb75b02e407e814e10f76bc485926d (patch)
tree2d3d8c5a908e2b38aa67ddf5d10500419ee426e8
parentd8bf7d416f60f52335d128cf16fbba0344702e49 (diff)
downloadgitpython-545ac2574cfb75b02e407e814e10f76bc485926d.tar.gz
docs(tutorial): fix GIT_SSH examples
They didn't show up as code-block Related to #256
-rw-r--r--doc/source/tutorial.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst
index 84b3b5f5..632d2d0c 100644
--- a/doc/source/tutorial.rst
+++ b/doc/source/tutorial.rst
@@ -331,17 +331,19 @@ You can easily access configuration information for a remote by accessing option
:start-after: # [26-test_references_and_objects]
:end-before: # ![26-test_references_and_objects]
-You can also specify per-call custom environments using a new context manager on the Git command, e.g. for using a specific SSH key. The following example works with `git` starting at *v2.3*.
+You can also specify per-call custom environments using a new context manager on the Git command, e.g. for using a specific SSH key. The following example works with `git` starting at *v2.3*::
ssh_cmd = 'ssh -i id_deployment_key'
with repo.git.custom_environment(GIT_SSH_COMMAND=ssh_cmd):
repo.remotes.origin.fetch()
-This one sets a custom script to be executed in place of `ssh`, and can be used in `git` prior to *v2.3*.
+This one sets a custom script to be executed in place of `ssh`, and can be used in `git` prior to *v2.3*::
ssh_executable = os.path.join(rw_dir, 'my_ssh_executable.sh')
with repo.git.custom_environment(GIT_SSH=ssh_executable):
repo.remotes.origin.fetch()
+
+You might also have a look at `Git.update_environment(...)` in case you want to setup a changed environment more permanently.
Submodule Handling
******************