diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/resilient/__init__.py | 10 |
1 files changed, 6 insertions, 4 deletions
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 |