From 69e6d8e5624b349c4a0474d48ceae07bc60115f1 Mon Sep 17 00:00:00 2001 From: user Date: Tue, 13 Aug 2019 13:27:32 -0400 Subject: git fix update notes --- backend/resilient/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'backend/resilient') diff --git a/backend/resilient/__init__.py b/backend/resilient/__init__.py index 026dee1..dfab073 100644 --- a/backend/resilient/__init__.py +++ b/backend/resilient/__init__.py @@ -81,19 +81,21 @@ class git: def pull(self): if self.remote == None: return False - os.environ["GIT_SSH_COMMAND"] = os.environ["GIT_SSH"] = "/bin/env ssh -F %s" % ssh_config_path + # TODO: GIT_SSH_COMMAND needs new version of git + # to make it work on old versions, path ssh_config_path on environment + # and use a wrapper script that calls ssh -F + # then place path to wrapper script in os.environ["GIT_SSH"] + os.environ["GIT_SSH_COMMAND"] = "ssh -F %s" % ssh_config_path status = os.system("git pull %s master" % self.remote) del os.environ["GIT_SSH_COMMAND"] - del os.environ["GIT_SSH"] return status == 0 def push(self): if self.push_remote == None: return False - os.environ["GIT_SSH_COMMAND"] = os.environ["GIT_SSH"] = "/bin/env ssh -F %s" % ssh_config_path + os.environ["GIT_SSH_COMMAND"] = "ssh -F %s" % ssh_config_path status = os.system("git push %s master" % self.push_remote) del os.environ["GIT_SSH_COMMAND"] - del os.environ["GIT_SSH"] return status == 0 -- cgit v1.2.3