From 2ec2a5d64c8f5bad7d2549720a928d4b52080d01 Mon Sep 17 00:00:00 2001 From: Christian Koestlin Date: Mon, 5 Dec 2016 20:32:45 +0100 Subject: [PATCH] Fixed upload to remotes with the url ssh://hostname Change-Id: I1d0dd4d3f90eac45205f6f4ca98a29b0babdbc3f --- git_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git_config.py b/git_config.py index 8c247394..f4aa131a 100644 --- a/git_config.py +++ b/git_config.py @@ -620,7 +620,7 @@ class Remote(object): u = self.review if u.startswith('persistent-'): u = u[len('persistent-'):] - if u.split(':')[0] not in ('http', 'https', 'sso'): + if u.split(':')[0] not in ('http', 'https', 'sso', 'ssh'): u = 'http://%s' % u if u.endswith('/Gerrit'): u = u[:len(u) - len('/Gerrit')] @@ -636,7 +636,7 @@ class Remote(object): host, port = os.environ['REPO_HOST_PORT_INFO'].split() self._review_url = self._SshReviewUrl(userEmail, host, port) REVIEW_CACHE[u] = self._review_url - elif u.startswith('sso:'): + elif u.startswith('sso:') or u.startswith('ssh:'): self._review_url = u # Assume it's right REVIEW_CACHE[u] = self._review_url elif 'REPO_IGNORE_SSH_INFO' in os.environ: