Support usernames that contain '@' and ssh Git URLs
Our company-internal Gerrit uses federated logins (Shibboleth/SAML), and the login names happen to include the at-signs. This needed a patch to Gerrit ([1], released in 2.13.10) to allow them. Cloning using regular git tools as well as through the gertty work, but `git-review --list` complained because it couldn't parse these URLs. [1] https://gerrit-review.googlesource.com/c/94914/ Change-Id: I6c1c75a585184ee3fb2847c1e6d30802e53f8b4c
This commit is contained in:
@@ -525,7 +525,7 @@ def parse_gerrit_ssh_params_from_git_url(git_url):
|
||||
hostname = parsed_url.path[2:].split("/")[0]
|
||||
|
||||
if "@" in hostname:
|
||||
(username, hostname) = hostname.split("@")
|
||||
(username, _, hostname) = hostname.rpartition("@")
|
||||
if ":" in hostname:
|
||||
(hostname, port) = hostname.split(":")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user