diff --git a/TarSCM/scm/base.py b/TarSCM/scm/base.py index 52fd92cf..8b7f9daa 100644 --- a/TarSCM/scm/base.py +++ b/TarSCM/scm/base.py @@ -68,8 +68,13 @@ def __init__(self, args, task): try: self.password = _kr.get_password(self.url, args.user) if not self.password: - raise Exception('No user {u} in keyring for service {s}' - .format(u=args.user, s=self.url)) + # try just the hostname + url_netloc = urlparse(self.url)[1] + self.password = _kr.get_password(url_netloc, args.user) + if not self.password: + raise Exception( + 'No user {u} in keyring for service {s}' + .format(u=args.user, s=self.url)) except AssertionError: raise Exception('Wrong keyring passphrase') self.user = args.user