Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

why doesn't git use global email in .gitconfig?

I have set git configs in ~/.gitconfig as

[user]
        name = david_abc
        email = davidz@abclabs.com

But when I push to a repository:

git push --set-upstream origin master
Username for 'https://bitbucket.org': david_abc
Password for 'https://david_abc@bitbucket.org':

My question is why it doesn’t recognize the name and email in the .gitconfig file.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Git does not use user.name for HTTP authentication, it is just user name that will be written in commits made by that user.

See git-credentials documentation for different options how to configure git to remember usernames (and eventually passwords) for repos.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading