diff --git a/source_control/git.py b/source_control/git.py index a5d94e3dbbe..47dab35812b 100644 --- a/source_control/git.py +++ b/source_control/git.py @@ -518,6 +518,10 @@ def main(): else: gitconfig = os.path.join(dest, '.git', 'config') + # make sure the key_file path is expanded for ~ and $HOME + if key_file is not None: + key_file = os.path.abspath(os.path.expanduser(key_file)) + # create a wrapper script and export # GIT_SSH= as an environment variable # for git to use the wrapper script