Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git ignores credentials stored in .git-credentials

I have two local repositories which are hosted on the same server and I have configured Git to store my credentials in the .git-credentials file via the following command.

git config credential.helper store

However, the fetch/pull/push without entering credentials only work in one repository. In the other repository, Git always asks for credentials and ignores the .git-credentials file.

like image 609
Matt Ke Avatar asked Nov 20 '25 11:11

Matt Ke


1 Answers

I have solved my problem. My config command was missing the global option. Without this option I have only configured it for one repository.

The correct command would have been:

git config --global credential.helper store
like image 73
Matt Ke Avatar answered Nov 22 '25 02:11

Matt Ke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!