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.

enter image description here

1

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.

2

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like