Android Studio: Wrong Username in Git Pull/Fetch Dialog
I Am Using Git in the Android Studio When I Am Trying to Pull, Fetch Then It Is Asking Password for --Global. 1 3 Answers You Probably Ran This: Git Config...
I am using git in the Android Studio when I am trying to pull, fetch then it is asking password for --global.
3 Answers
You probably ran this:
git config credential.username --global username
Instead of
git config --global credential.username username
To fix it, do:
git config credential.username username
And to do what you originally intended to do:
git config --global credential.username username
You should try entering username and password for your GitHub account or try login with Github.
If your remote is https you might enter username and password every time! you can check remote with this command:
git remote -v
If you see something like this: origin https:// , then it's HTTPS remote.
You can connect your remote with ssh which is better than https, and you don't need to enter your username/password every time.
but with ssh you will see remote like this:
origin :myusername/project.git
based on your operating system it's different to do it, search how to generate ssh key and add it into the GitHub on Linux/Windows/Mac.