David Z
David Z

Reputation: 7041

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

I have set git configs in ~/.gitconfig as

[user]
        name = david_abc
        email = [email protected]

But when I push to a repository:

git push --set-upstream origin master
Username for 'https://bitbucket.org': david_abc
Password for 'https://[email protected]':

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

Upvotes: 0

Views: 189

Answers (1)

blami
blami

Reputation: 7411

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.

Upvotes: 1

Related Questions