Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Replace GIT_SSH with GIT_SSH_COMMAND for SSH key management.#256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 1 commit intogitpython-developers:masterfromteeberg:master
Apr 8, 2015
Merged
Show file tree
Hide file tree
Changes fromall 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
9 changes: 4 additions & 5 deletionsdoc/source/tutorial.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -331,12 +331,11 @@ 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
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.

.. literalinclude:: ../../git/test/test_docs.py
:language: python
:start-after: # [32-test_references_and_objects]
:end-before: # ![32-test_references_and_objects]
ssh_cmd = 'ssh -i id_deployment_key'
with repo.git.custom_environment(GIT_SSH_COMMAND=ssh_cmd):
repo.remotes.origin.fetch()

Submodule Handling
******************
Expand Down
9 changes: 0 additions & 9 deletionsgit/test/test_docs.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -437,15 +437,6 @@ def test_references_and_objects(self, rw_dir):
git.for_each_ref() # '-' becomes '_' when calling it
# ![31-test_references_and_objects]

# [32-test_references_and_objects]
ssh_executable = os.path.join(rw_dir, 'my_ssh_executable.sh')
with repo.git.custom_environment(GIT_SSH=ssh_executable):
# Note that we don't actually make the call here, as our test-setup doesn't permit it to
# succeed.
# It will in your case :)
repo.remotes.origin.fetch
# ![32-test_references_and_objects]

def test_submodules(self):
# [1-test_submodules]
repo = self.rorepo
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp