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 usernameInstead of
git config --global credential.username usernameTo fix it, do:
git config credential.username usernameAnd 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.
2If your remote is https you might enter username and password every time! you can check remote with this command:
git remote -vIf 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.gitbased 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.