main: ignore path from git remote URL

It's much easier to use single keypair per user@host
This commit is contained in:
Roman Zeyde
2016-03-05 14:56:58 +02:00
parent 7c102e435e
commit e6ccc324a0

View File

@@ -91,8 +91,8 @@ def git_host(remote_name):
raise ValueError('{:d} git remotes found: %s', matches)
url = matches[0].strip()
user, url = url.split('@', 1)
host, path = url.split(':', 1)
return 'ssh://{}@{}/{}'.format(user, host, path)
host, _ = url.split(':', 1) # skip unused path (1 key per user@host)
return 'ssh://{}@{}'.format(user, host)
def ssh_sign(conn, label, blob):