
The instant solution is to delete or fix your Git entries in the Windows Credential Manager. Refer to my blog on the steps to authenticate to git repository after enabling two factor authentication.FWIW, I stumbled over this very same problem (and my boss too, so it got more intense). In case if you have enabled two factor authentication for your git repository then the password would be the “personal access token”. Each credential is stored on its own line as a URL like: domain can be any git provider, example: etc. git-credentials file stores password in plain text format. It is also possible to specify the file to store the credentials using the following command, git config -global credential.helper "store -file ~/.my-credentials" In Windows the path is C:\Users\\.git-credentials In Mac and Linux the path is /Users//.git-credentials Refer to the following documentation for further details git credentials cache.Įxecute the following command in a terminal to configure the git credential helper in store mode, git config -global credential.helper storeīy default, the git credentials in the “store” mode will be stored in the “.git-credentials” file in the user’s home directory (~/.git-credentials) We can increase the cache timeout using the following command, git config -global credential.helper "cache -timeout=3600" None of the passwords are ever stored on disk, and they are purged from the cache after 15 minutes (default cache timeout).Įxecute the following command in a terminal to configure the git credential helper in cache mode, git config -global credential.helper cache

Git credentials helper can be configured in one of the following modes to remember the user credentials,Ĭache credentials in memory for a short period of time. Every connection will prompt you for your username and password.


When using git commands via Terminal, Git will sometimes need credentials from the user in order to perform operations for example, it may need to ask for a username and password in order to access a remote repository over HTTP/HTTPS.
