Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 660
Rahul Yadav Avatar asked Mar 03 '17 17:03

Rahul Yadav


People also ask

Where are git credentials stored locally?

~/. git-credentials. User-specific credentials file. $XDG_CONFIG_HOME/git/credentials.

How do I find my git password on Windows?

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.

Where is git password stored Linux?

The default is ~/. git-credentials .

Where are git remotes stored?

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.


3 Answers

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.

like image 163
Rahul Yadav Avatar answered Oct 23 '22 09:10

Rahul Yadav


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

like image 22
Philippe Avatar answered Oct 23 '22 08:10

Philippe


sudo cat ~/.git-credentials

If you have saved credentials locally, will yield
https://<USERNAME>:<PASSWORD_OR_TOKEN_IN_USE>@github.com

like image 8
Gabriel Petersson Avatar answered Oct 23 '22 08:10

Gabriel Petersson