diff --git a/AUTHORS b/AUTHORS index 7a46ea62b..ac27d9627 100644 --- a/AUTHORS +++ b/AUTHORS @@ -144,6 +144,7 @@ Contributors: * Jay Knight (jay-knight) * fbdb * Charbel Jacquin (charbeljc) + * Jeronimo Garcia (bechampion) * Devadathan M B (devadathanmb) * Charalampos Stratakis * Laszlo Bimba (bimlas) diff --git a/pgcli/main.py b/pgcli/main.py index ad01a46fd..94ac9af10 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -652,7 +652,7 @@ def connect(self, database="", host="", user="", port="", passwd="", dsn="", **k if self.force_passwd_prompt and not passwd: passwd = click.prompt("Password for %s" % user, hide_input=True, show_default=False, type=str) - key = f"{user}@{host}" + key = f"{user}@{host}@{port}" if not passwd and auth.keyring: passwd = auth.keyring_get_password(key)