Where is my remote git repository password stored on the local machine?

Rahul Yadav picture Rahul Yadav · Mar 3, 2017 · Viewed 35.1k times · Source

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

Answer

Rahul Yadav picture Rahul Yadav · Mar 4, 2017

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.