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.
>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.