diff options
Diffstat (limited to 'backend/resilient')
-rw-r--r-- | backend/resilient/__init__.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/backend/resilient/__init__.py b/backend/resilient/__init__.py index d44e914..e2b40c7 100644 --- a/backend/resilient/__init__.py +++ b/backend/resilient/__init__.py @@ -25,7 +25,7 @@ html_path = os.path.normpath(os.path.join(root_path, 'html')) wiki_src_path = os.path.normpath(os.path.join(root_path, 'wiki')) git_path = os.path.normpath(os.path.join(root_path, '.git')) -ssh_config_path = os.path.join(auth_path, "ssh-config") +ssh_wrap_path = os.path.join(backend_path, "wrapped_ssh.sh") for auth_subpath, auth_subpaths, auth_subfiles in os.walk(auth_path): for auth_subfile in auth_subfiles: @@ -83,21 +83,17 @@ class git: def pull(self): if self.remote == None: return False - # 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 + os.environ["GIT_SSH"] = ssh_wrap_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"] = "ssh -F %s" % ssh_config_path + os.environ["GIT_SSH"] = ssh_wrap_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 |