I have a git repository set up on bitbucket
$ git remote -v
origin https://[email protected]/myusername/my_repository_name.git (fetch)
origin https://[email protected]/myusername/my_repository_name.git (push)
I pull and push to the repository from my office workstation and home PC. When I push or pull from my office workstation, it prompts me for the password. However when I push or pull from my home PC it doesn't prompt for a password.
I don't specifically remember what I did on my home PC to remember the password.
running $ git config credential.helper
returns manager
$ git config credential.helper
manager
Contents .gitconfig
file in my user folder at root level
[user]
name = myusername
email = [email protected]
Where is the password stored on the local disk?
What is the command to check the status of current credentials?
How do I similarly remember the password on my office workstation?
Note: I am using Windows 7
~/. git-credentials. User-specific credentials file. $XDG_CONFIG_HOME/git/credentials.
Or finding it via the Control Panel -> Manage Windows Credentials. Go to Windows Credentials -> Generic Credentials. Here your credential should be listed if everything is working correctly. Git should add it by default the first time you log in to a new repository.
The default is ~/. git-credentials .
The git remote command is essentially an interface for managing a list of remote entries that are stored in the repository's ./. git/config file.
if $ git config credential.helper
returns manager
, the password is stored in the windows credential manager, if it returns store
, password is stored in a .git-credentials
file in the user folder.
With the default configuration of git on windows, this is stored in Windows under: control panel
=> User
=> Credential manager
.
See a more details answer here
sudo cat ~/.git-credentials
If you have saved credentials locally, will yieldhttps://<USERNAME>:<PASSWORD_OR_TOKEN_IN_USE>@github.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With