Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Location of ~/.git-credentials file in Windows 10?

Tags:

git

windows

I searched but couldn't find the path of ~/.git-credentials in my Windows 10 machine. git documentation says that it stores username and password in plain-text in ~/.git-credentials. I want to verify it by opening the file manually.

like image 520
GorvGoyl Avatar asked Sep 07 '18 06:09

GorvGoyl


People also ask

Where are git credentials stored?

If not specified, credentials will be searched for from ~/. git-credentials and $XDG_CONFIG_HOME/git/credentials , and credentials will be written to ~/. git-credentials if it exists, or $XDG_CONFIG_HOME/git/credentials if it exists and the former does not. See also FILES.

How do I find my git credential password?

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.

Where are the credentials stored?

Application and network credentials are stored in the Windows Credentials locker. Credential Lockers store credentials in encrypted . vcrd files, located under %Systemdrive%\Users\[Username]\AppData\Local\Microsoft\[Vault/Credentials]\ . The encryption key can be found in a file named Policy.

What is git credential file?

The . git-credentials file stores password in plain text format. Each credential is stored on its own line as a URL like: https://<url_encoded_plain_text_username>:<url_encoded_plain_text_password>@github.com. The domain can be any git provider, example: @github.com, @gitlab.com, etc.


2 Answers

On windows 10, git user credentials are now stored with the Credential Manager.

like image 172
Chengbin XIA Avatar answered Oct 21 '22 12:10

Chengbin XIA


It is located at %UserProfile%\.git-credentials, which corresponds to C:\Users\<username>\.git-credentials (unless you've modified the registry to move your user's profile directory elsewhere).

Generally, ~ refes to the user's home directory on Linux, and many cross-platform tools which store data in ~ on Linux (including git) store their data in the user's home directory on Windows as well.

like image 32
Mikhail Burshteyn Avatar answered Oct 21 '22 11:10

Mikhail Burshteyn