summaryrefslogtreecommitdiff
path: root/scripts/ssh_wrapper.py
diff options
context:
space:
mode:
authorJonas Trappenberg <jonas@trappenberg.ch>2015-01-20 23:19:28 -0800
committerJonas Trappenberg <jonas@trappenberg.ch>2015-01-21 21:35:19 -0800
commit261aedd2e13308755894405c7a76b72373dab879 (patch)
tree7ae091f736ede3ce0ae3e8c8e9b701b4eea4110c /scripts/ssh_wrapper.py
parent1287f69b42fa7d6b9d65abfef80899b22edfef55 (diff)
downloadgitpython-261aedd2e13308755894405c7a76b72373dab879.tar.gz
Add 'sshkey' context manager
Diffstat (limited to 'scripts/ssh_wrapper.py')
-rwxr-xr-xscripts/ssh_wrapper.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/ssh_wrapper.py b/scripts/ssh_wrapper.py
new file mode 100755
index 00000000..af657f60
--- /dev/null
+++ b/scripts/ssh_wrapper.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+
+import os
+import subprocess
+import sys
+
+ssh_options = ['-i', os.environ['GIT_SSH_KEY_FILE']]
+ret_code = subprocess.call(['ssh'] + ssh_options + sys.argv[1:])
+sys.exit(ret_code)