| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -331,17 +331,19 @@ You can easily access configuration information for a remote by accessing option | |||
| 331 | 331 | :start-after: # [26-test_references_and_objects] | |
| 332 | 332 | :end-before: # ![26-test_references_and_objects] | |
| 333 | 333 | ||
| 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*:: | ||
| 335 | 335 | ||
| 336 | 336 | ssh_cmd = 'ssh -i id_deployment_key' | |
| 337 | 337 | with repo.git.custom_environment(GIT_SSH_COMMAND=ssh_cmd): | |
| 338 | 338 | repo.remotes.origin.fetch() | |
| 339 | 339 | ||
| 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*:: | ||
| 341 | 341 | ||
| 342 | 342 | ssh_executable = os.path.join(rw_dir, 'my_ssh_executable.sh') | |
| 343 | 343 | with repo.git.custom_environment(GIT_SSH=ssh_executable): | |
| 344 | 344 | 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. | ||
| 345 | 347 | ||
| 346 | 348 | Submodule Handling | |
| 347 | 349 | ****************** | |
| Back | FazBrowse Home | New Git URL |
0 commit comments