From 6ae1740b61a19cb41eebc0795fa14190282cdc29 Mon Sep 17 00:00:00 2001 From: Trenton VanderWert Date: Tue, 19 Dec 2023 15:45:30 -0600 Subject: [PATCH 1/2] added will not echo message to the login token message Signed-off-by: Trenton VanderWert --- src/huggingface_hub/_login.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/huggingface_hub/_login.py b/src/huggingface_hub/_login.py index 8fc6f8755f..489792526b 100644 --- a/src/huggingface_hub/_login.py +++ b/src/huggingface_hub/_login.py @@ -181,7 +181,7 @@ def interpreter_login(new_session: bool = True, write_permission: bool = False) print(" To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .") if os.name == "nt": print("Token can be pasted using 'Right-Click'.") - token = getpass("Token: ") + token = getpass("Token (will not echo): ") add_to_git_credential = _ask_for_confirmation_no_tui("Add token as git credential?") _login(token=token, add_to_git_credential=add_to_git_credential, write_permission=write_permission) From 466b11129073a22c8bc74ba2da914a137f22c0e6 Mon Sep 17 00:00:00 2001 From: Trent V Date: Wed, 20 Dec 2023 15:17:23 +0000 Subject: [PATCH 2/2] update login token field to be more descriptive Co-authored-by: Lucain --- src/huggingface_hub/_login.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/huggingface_hub/_login.py b/src/huggingface_hub/_login.py index 87182a8c8c..0bd7ae453f 100644 --- a/src/huggingface_hub/_login.py +++ b/src/huggingface_hub/_login.py @@ -186,7 +186,7 @@ def interpreter_login(new_session: bool = True, write_permission: bool = False) print(" To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .") if os.name == "nt": print("Token can be pasted using 'Right-Click'.") - token = getpass("Token (will not echo): ") + token = getpass("Enter your token (input will not be visible): ") add_to_git_credential = _ask_for_confirmation_no_tui("Add token as git credential?") _login(token=token, add_to_git_credential=add_to_git_credential, write_permission=write_permission)