1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Clarify role of PAT in authentication (#56083)

Co-authored-by: Jules Porter <jules-p@users.noreply.github.com>
Co-authored-by: Jeff Stasko <y-me-y@github.com>
This commit is contained in:
Jules
2025-06-18 15:43:12 +02:00
committed by GitHub
parent 0956e330d6
commit 4380b62643
2 changed files with 4 additions and 0 deletions

View File

@@ -164,6 +164,8 @@ Username: YOUR-USERNAME
Password: YOUR-PERSONAL-ACCESS-TOKEN Password: YOUR-PERSONAL-ACCESS-TOKEN
``` ```
Although you are required to enter your username along with your {% data variables.product.pat_generic %}, the username is not used to authenticate you. Instead, the {% data variables.product.pat_generic %} is used to authenticate you. If you do not enter a username, you will receive an error message that your credentials are invalid.
{% data variables.product.pat_generic_caps %}s can only be used for HTTPS Git operations. If your repository uses an SSH remote URL, you will need to [switch the remote from SSH to HTTPS](/get-started/git-basics/managing-remote-repositories#switching-remote-urls-from-ssh-to-https). {% data variables.product.pat_generic_caps %}s can only be used for HTTPS Git operations. If your repository uses an SSH remote URL, you will need to [switch the remote from SSH to HTTPS](/get-started/git-basics/managing-remote-repositories#switching-remote-urls-from-ssh-to-https).
If you are not prompted for your username and password, your credentials may be cached on your computer. You can [update your credentials in the Keychain](/get-started/git-basics/updating-credentials-from-the-macos-keychain) to replace your old password with the token. If you are not prompted for your username and password, your credentials may be cached on your computer. You can [update your credentials in the Keychain](/get-started/git-basics/updating-credentials-from-the-macos-keychain) to replace your old password with the token.

View File

@@ -46,6 +46,8 @@ If you are using a {% data variables.product.pat_v2 %}, your {% data variables.p
If you are using a {% data variables.product.pat_v1 %}, it requires specific scopes in order to access each REST API endpoint. For general guidance about what scopes to choose, see [AUTOTITLE](/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes). If you are using a {% data variables.product.pat_v1 %}, it requires specific scopes in order to access each REST API endpoint. For general guidance about what scopes to choose, see [AUTOTITLE](/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes).
{% data variables.product.pat_generic_caps_plural %} act as your identity (limited by the scopes or permissions you selected) when you make requests to the REST API. As such, it is important to keep your {% data variables.product.pat_generic_plural %} secure. For more information about keeping your {% data variables.product.pat_generic_plural %} secure, see [AUTOTITLE](/rest/authentication/keeping-your-api-credentials-secure?apiVersion=2022-11-28).
### {% data variables.product.pat_generic_caps_plural %} and SAML SSO ### {% data variables.product.pat_generic_caps_plural %} and SAML SSO
{% ifversion fpt or ghec %}If you use a {% data variables.product.pat_v1 %} to access an organization that enforces SAML single sign-on (SSO) for authentication, you will need to authorize your token after creation. {% data variables.product.pat_v2_caps %}s are authorized during token creation, before access to the organization is granted. For more information, see [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on). {% ifversion fpt or ghec %}If you use a {% data variables.product.pat_v1 %} to access an organization that enforces SAML single sign-on (SSO) for authentication, you will need to authorize your token after creation. {% data variables.product.pat_v2_caps %}s are authorized during token creation, before access to the organization is granted. For more information, see [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).