1
0
mirror of synced 2025-12-20 10:28:40 -05:00
Files
docs/content/get-started/git-basics/why-is-git-always-asking-for-my-credentials.md

2.8 KiB

title, intro, redirect_from, versions, shortTitle
title intro redirect_from versions shortTitle
Why is Git always asking for my credentials? 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.
/articles/why-is-git-always-asking-for-my-password
/github/using-git/why-is-git-always-asking-for-my-password
/github/getting-started-with-github/why-is-git-always-asking-for-my-password
/github/getting-started-with-github/getting-started-with-git/why-is-git-always-asking-for-my-password
/get-started/getting-started-with-git/why-is-git-always-asking-for-my-password
/get-started/git-basics/why-is-git-always-asking-for-my-password
fpt ghes ghec
* * *
Repeated credential prompts

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.

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

You can avoid being prompted for your password by configuring Git to cache your credentials 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.

{% ifversion ghec %} If you are an Enterprise Managed User, and your enterprise owners do not have the SSO Redirect setting enabled for the enterprise, then credential caching may not work properly when using Git Credential Manager (GCM). You will need to disable GCM account filtering locally in this situation to prevent getting prompted for authentication each time you perform a Git operation. For more details, see AUTOTITLE. {% endif %}

Further reading