diff --git a/git_config.py b/git_config.py index 0379181a..09c4b48f 100644 --- a/git_config.py +++ b/git_config.py @@ -638,7 +638,10 @@ class Remote(object): self._review_url = http_url else: host, port = info.split() - self._review_url = self._SshReviewUrl(userEmail, host, port) + if _open_ssh(host, port): + self._review_url = self._SshReviewUrl(userEmail, host, port) + else: + self._review_url = http_url except urllib.error.HTTPError as e: raise UploadError('%s: %s' % (self.review, str(e))) except urllib.error.URLError as e: