From 4df4159413a4bf30a891f21cd69202e8746c8fea Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 22 Jan 2015 19:04:57 +0100 Subject: Removed Git.sshkey() as it couldn't be distributed properly. However, I kept information on how to achieve the same thing with `custom_environment()` in the test. Related to #234 --- git/cmd.py | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'git/cmd.py') 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() -- cgit v1.2.1