summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-22 19:04:57 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-22 19:04:57 +0100
commit4df4159413a4bf30a891f21cd69202e8746c8fea (patch)
treee44615e5382204ad60ba2eaa9e90b6021b270a2a /git/cmd.py
parentf3d91ca75500285d19c6ae2d4bf018452ad822a6 (diff)
downloadgitpython-4df4159413a4bf30a891f21cd69202e8746c8fea.tar.gz
Removed Git.sshkey() as it couldn't be distributed properly.0.3.6
However, I kept information on how to achieve the same thing with `custom_environment()` in the test. Related to #234
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 960b2a21..7e15d4ea 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -439,10 +439,6 @@ class Git(LazyMixin):
super(Git, self)._set_cache_(attr)
# END handle version info
- def _sshkey_script_path(self):
- this_dir = os.path.dirname(__file__)
- return os.path.join(this_dir, 'scripts', 'ssh_wrapper.sh')
-
@property
def working_dir(self):
""":return: Git directory we are working on"""
@@ -670,23 +666,6 @@ class Git(LazyMixin):
finally:
self.update_environment(**old_env)
- @contextmanager
- def sshkey(self, sshkey_file_path):
- """
- A context manager to temporarily set an SSH key for all operations that
- run inside it.
-
- ``Examples``::
-
- with self.sshkey('deployment_key'):
- repo.remotes.origin.fetch()
-
- :param sshkey_file_path: Path to a private SSH key file
- """
- ssh_wrapper = self._sshkey_script_path()
- with self.custom_environment(GIT_SSH_KEY_FILE=sshkey_file_path, GIT_SSH=ssh_wrapper):
- yield
-
def transform_kwargs(self, split_single_char_options=False, **kwargs):
"""Transforms Python style kwargs into git command line options."""
args = list()