Reputation: 236
I have saved my username globally in GIT when I check by using git config --global user.name
command, it shows me correct username but it still keeps me asking username every time when I push or commit the code.
Does anyone have an idea?
Thanks in advance.
Upvotes: 1
Views: 1108
Reputation: 1324577
Asking for your username when pushing is about authentication, not commit authorship.
Regarding authentication (credentials, username/password provided to a remote Git repository hosting service), you need to check your git config credential.helper
: that setting can setup a cache, avoiding to request your credentials every time you are pushing.
As the OP Pribhav comments, you can as in this answer, embed the username in the URL (https://username@site/...
).
Nut the credential.helper
is still needed to avoid asking for your password.
Upvotes: 2