diff --git a/AUTHORS b/AUTHORS index 771de13f..b40f1d52 100644 --- a/AUTHORS +++ b/AUTHORS @@ -144,6 +144,7 @@ Contributors: * Jay Knight (jay-knight) * fbdb * Charbel Jacquin (charbeljc) + * Jeronimo Garcia (bechampion) Creator: -------- diff --git a/pgcli/main.py b/pgcli/main.py index 0b4b64f5..501880df 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -620,7 +620,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)