Skip to content

Commit 7649161

Browse files
erichanson1Copilotstacycarterheiskrsophietheking
authored
Add information about the Git Credential Manager and Enterprise Managed Users (#56266)
Co-authored-by: Copilot <[email protected]> Co-authored-by: Stacy Carter <[email protected]> Co-authored-by: Kevin Heis <[email protected]> Co-authored-by: Sophie <[email protected]>
1 parent 8577ed4 commit 7649161

File tree

5 files changed

+30
-5
lines changed

5 files changed

+30
-5
lines changed

content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ If your enterprise uses {% data variables.product.prodname_emus %}, you can choo
138138

139139
By default, to hide the existence of private resources, when an unauthenticated user attempts to access your enterprise, {% data variables.product.company_short %} displays a 404 error.
140140

141-
To prevent confusion from your developers, you can change this behavior so that users are automatically redirected to single sign-on (SSO) through your identity provider (IdP). When you enable automatic redirects, anyone who visits the URL for any of your enterprise's resources will be able to see that the resource exists. However, they'll only be able to see the resource if they have appropriate access after authenticating with your IdP.
141+
To prevent confusion from your developers, you can change this behavior by enabling the "Automatically redirect users to sign in" setting so that users are automatically redirected to single sign-on (SSO) through your identity provider (IdP). When you enable this setting, anyone who visits the URL for any of your enterprise's resources will be able to see that the resource exists. However, they'll only be able to see the resource if they have appropriate access after authenticating with your IdP.
142+
143+
The configuration of this setting also affects {% data variables.product.prodname_emus %} who use Git Credential Manager (GCM). For more details, see the [`git-credential-manager` repository](https://github.com/git-ecosystem/git-credential-manager)
144+
145+
If "Automatically redirect users to sign in" is enabled, {% data variables.product.github %} sends the server hints that let GCM automatically filter accounts for your enterprise members. If the setting is disabled, users who use GCM must turn off account filtering locally in GCM to avoid being prompted for authentication each time they perform a Git operation. For more details, see [AUTOTITLE](/get-started/git-basics/caching-your-github-credentials-in-git).
142146

143147
> [!NOTE]
144148
> If a user is signed in to their personal account when they attempt to access any of your enterprise's resources, they'll be automatically signed out and redirected to SSO to sign in to their {% data variables.enterprise.prodname_managed_user %}. For more information, see [AUTOTITLE](/enterprise-cloud@latest/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts).

content/admin/managing-iam/understanding-iam-for-enterprises/getting-started-with-enterprise-managed-users.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,5 @@ Using an **incognito or private browsing window**:
7979
Developers may need to maintain separate, personal accounts for their work outside of your {% data variables.enterprise.prodname_emu_enterprise %}. You can help them manage multiple accounts by providing the following resources:
8080

8181
* **On the command line**, developers can configure Git to simplify the process of using multiple accounts. See [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts).
82+
* **In Git Credential Manager (GCM)**: Turn off account filtering to prevent multiple sign-in prompts if the [SSO Redirect setting](/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-sso-for-unauthenticated-users) is not enabled for your enterprise. See [AUTOTITLE](/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-sso-for-unauthenticated-users).
8283
* **In the web interface**, developers can switch between accounts without always needing to re-authenticate. See [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/switching-between-accounts).

content/get-started/git-basics/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ children:
1616
- /set-up-git
1717
- /setting-your-username-in-git
1818
- /caching-your-github-credentials-in-git
19-
- /why-is-git-always-asking-for-my-password
19+
- /why-is-git-always-asking-for-my-credentials
2020
- /updating-credentials-from-the-macos-keychain
2121
- /git-workflows
2222
- /about-remote-repositories
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
11
---
2-
title: Why is Git always asking for my password?
3-
intro: 'If Git prompts you for a username and password every time you try to interact with GitHub, you''re probably using the HTTPS clone URL for your repository.'
2+
title: Why is Git always asking for my credentials?
3+
intro: 'If Git prompts you for your credentials every time you try to interact with GitHub, you''re probably using the HTTPS clone URL for your repository.'
44
redirect_from:
55
- /articles/why-is-git-always-asking-for-my-password
66
- /github/using-git/why-is-git-always-asking-for-my-password
77
- /github/getting-started-with-github/why-is-git-always-asking-for-my-password
88
- /github/getting-started-with-github/getting-started-with-git/why-is-git-always-asking-for-my-password
99
- /get-started/getting-started-with-git/why-is-git-always-asking-for-my-password
10+
- /get-started/git-basics/why-is-git-always-asking-for-my-password
1011
versions:
1112
fpt: '*'
1213
ghes: '*'
1314
ghec: '*'
14-
shortTitle: Git passwords
15+
shortTitle: Repeated credential prompts
1516
---
1617
Using an HTTPS remote URL has some advantages compared with using SSH. It's easier to set up than SSH, and usually works through strict firewalls and proxies. However, it also prompts you to enter your {% data variables.product.github %} credentials every time you pull or push a repository.
1718

1819
{% data reusables.user-settings.password-authentication-deprecation %}
1920

2021
You can avoid being prompted for your password by configuring Git to [cache your credentials](/get-started/git-basics/caching-your-github-credentials-in-git) for you. Once you've configured credential caching, Git automatically uses your cached {% data variables.product.pat_generic %} when you pull or push a repository using HTTPS.
2122

23+
{% ifversion ghec %}
24+
If you are an [Enterprise Managed User](/get-started/learning-about-github/types-of-github-accounts#managed-user-accounts), and your enterprise owners do not have [the SSO Redirect setting](/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-sso-for-unauthenticated-users) enabled for the enterprise, then credential caching may not work properly when using [Git Credential Manager (GCM)](https://github.com/git-ecosystem/git-credential-manager). You will need to disable GCM [account filtering](https://github.com/git-ecosystem/git-credential-manager/blob/release/docs/configuration.md#credentialgithubaccountfiltering) locally in this situation to prevent getting prompted for authentication each time you perform a Git operation. For more details, see [AUTOTITLE](/get-started/git-basics/caching-your-github-credentials-in-git).
25+
{% endif %}
26+
2227
## Further reading
2328

2429
* [AUTOTITLE](/get-started/git-basics/about-remote-repositories)
2530
* [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/about-authentication-to-github)
2631
* [AUTOTITLE](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent)
32+
* [AUTOTITLE](/get-started/git-basics/caching-your-github-credentials-in-git)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
11
The next time you clone an HTTPS URL that requires authentication, Git will prompt you to log in using a browser window. You may first be asked to authorize an {% data variables.product.prodname_oauth_app %}. If your account or organization requires [two-factor auth](/authentication/securing-your-account-with-two-factor-authentication-2fa), you'll also need to complete the 2FA challenge.
2+
3+
{% ifversion not ghes %}
4+
5+
> [!TIP]
6+
>
7+
> If you're a member of an enterprise that uses {% data variables.product.prodname_emus %}, your enterprise view has the "Users managed by ACCOUNT NAME" header bar at the top of the screen. In that case you will need to disable account filtering locally in GCM to prevent getting prompted for authentication each time a remote Git operation is performed. For more details, see the [`git-credential-manager` repository](https://github.com/git-ecosystem/git-credential-manager/blob/release/docs/configuration.md#credentialgithubaccountfiltering).
8+
>
9+
> To configure the Git Credential Manager run the following command:
10+
>
11+
> ```bash
12+
> git config --global credential.gitHubAccountFiltering "false"
13+
> ```
14+
15+
{% endif %}

0 commit comments

Comments
 (0)