Hi everyone,
we have a gerrit server with ssh and https access enabled, but access is limited.
* everyone has access using https
* only some have access using ssh
Users without ssh access can not use "repo upload", since gerrit/ssh_info returns a
configuration, that does not work for them.
Proposal:
Repo should fall back to http, if ssh connection fails for http repos
Patch:
--- a/git_config.py
+++ b/git_config.py
@@ -638,7 +642,11 @@ class Remote(object):
self._review_url = http_url
else:
host, port = info.split()
- self._review_url = self._SshReviewUrl(userEmail, host, port)
+ ssh_connected = _open_ssh(host, port)
+ if ssh_connected:
+ 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:
I'm looking forward to any feedback you have.
Best regards,
Timo