Skip to content

Commit 12f81c1

Browse files
FL33TW00DhanouticelinaWauplin
authored
chore: Link to Authentication (#2905)
* chore: quick pr * fix test --------- Co-authored-by: FL33TW00D <[email protected]> Co-authored-by: Célina <[email protected]> Co-authored-by: Lucain <[email protected]>
1 parent 73b6b79 commit 12f81c1

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

docs/source/en/_redirects.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ package_reference/login: package_reference/authentication
1313
# Alias for hf-transfer description
1414
hf_transfer: package_reference/environment_variables#hfhubenablehftransfer
1515

16+
# Alias for auth
17+
authentication: quick-start#authentication
18+
1619
# Rename webhooks_server to webhooks
1720
guides/webhooks_server: guides/webhooks

src/huggingface_hub/utils/_http.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,8 @@ def hf_raise_for_status(response: Response, endpoint_name: Optional[str] = None)
453453
+ f"Repository Not Found for url: {response.url}."
454454
+ "\nPlease make sure you specified the correct `repo_id` and"
455455
" `repo_type`.\nIf you are trying to access a private or gated repo,"
456-
" make sure you are authenticated."
456+
" make sure you are authenticated. For more details, see"
457+
" https://huggingface.co/docs/huggingface_hub/authentication"
457458
)
458459
raise _format(RepositoryNotFoundError, message, response) from e
459460

tests/test_hf_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,9 @@ def test_create_commit_repo_does_not_exist(self) -> None:
758758
f" {self._api.endpoint}/api/models/{USER}/repo_that_do_not_exist/preupload/main.\nPlease"
759759
" make sure you specified the correct `repo_id` and"
760760
" `repo_type`.\nIf you are trying to access a private or gated"
761-
" repo, make sure you are authenticated.\nNote: Creating a commit"
762-
" assumes that the repo already exists on the Huggingface Hub."
761+
" repo, make sure you are authenticated."
762+
" For more details, see https://huggingface.co/docs/huggingface_hub/authentication"
763+
"\nNote: Creating a commit assumes that the repo already exists on the Huggingface Hub."
763764
" Please use `create_repo` if it's not the case."
764765
)
765766

0 commit comments

Comments
 (0)