{"meta":{"title":"Why is Git always asking for my credentials?","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.","product":"Get started","breadcrumbs":[{"href":"/en/enterprise-cloud@latest/get-started","title":"Get started"},{"href":"/en/enterprise-cloud@latest/get-started/git-basics","title":"Git basics"},{"href":"/en/enterprise-cloud@latest/get-started/git-basics/why-is-git-always-asking-for-my-credentials","title":"Repeated credential prompts"}],"documentType":"article"},"body":"# Why is Git always asking for my credentials?\n\nIf 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.\n\nUsing 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 GitHub credentials every time you pull or push a repository.\n\nWhen Git prompts you for your password, enter your personal access token. Alternatively, you can use a credential helper like [Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager/blob/main/README.md). Password-based authentication for Git has been removed in favor of more secure authentication methods. For more information, see [Managing your personal access tokens](/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).\n\nYou can avoid being prompted for your password by configuring Git to [cache your credentials](/en/enterprise-cloud@latest/get-started/git-basics/caching-your-github-credentials-in-git) for you. Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS.\n\nIf you are an [Enterprise Managed User](/en/enterprise-cloud@latest/get-started/learning-about-github/types-of-github-accounts#managed-user-accounts), and your enterprise owners do not have [the SSO Redirect setting](/en/enterprise-cloud@latest/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 [Caching your GitHub credentials in Git](/en/enterprise-cloud@latest/get-started/git-basics/caching-your-github-credentials-in-git).\n\n## Further reading\n\n* [About remote repositories](/en/enterprise-cloud@latest/get-started/git-basics/about-remote-repositories)\n* [About authentication to GitHub](/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/about-authentication-to-github)\n* [Generating a new SSH key and adding it to the ssh-agent](/en/enterprise-cloud@latest/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)\n* [Caching your GitHub credentials in Git](/en/enterprise-cloud@latest/get-started/git-basics/caching-your-github-credentials-in-git)"}