Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 545ac25

Browse filesBrowse files
committed
docs(tutorial): fix GIT_SSH examples
They didn't show up as code-block Related to #256
1 parent d8bf7d4 commit 545ac25
Copy full SHA for 545ac25

1 file changed

+4-2Lines changed: 4 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/source/tutorial.rst‎

Copy file name to clipboardExpand all lines: doc/source/tutorial.rst
+4-2Lines changed: 4 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -331,17 +331,19 @@ You can easily access configuration information for a remote by accessing option
331331
:start-after: # [26-test_references_and_objects]
332332
:end-before: # ![26-test_references_and_objects]
333333

334-
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*.
334+
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*::
335335

336336
ssh_cmd = 'ssh -i id_deployment_key'
337337
with repo.git.custom_environment(GIT_SSH_COMMAND=ssh_cmd):
338338
repo.remotes.origin.fetch()
339339

340-
This one sets a custom script to be executed in place of `ssh`, and can be used in `git` prior to *v2.3*.
340+
This one sets a custom script to be executed in place of `ssh`, and can be used in `git` prior to *v2.3*::
341341

342342
ssh_executable = os.path.join(rw_dir, 'my_ssh_executable.sh')
343343
with repo.git.custom_environment(GIT_SSH=ssh_executable):
344344
repo.remotes.origin.fetch()
345+
346+
You might also have a look at `Git.update_environment(...)` in case you want to setup a changed environment more permanently.
345347

346348
Submodule Handling
347349
******************

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.