0

Git/Github does not ask me for username/password at the command line, when I was hoping that it would! Notice that this is the opposite question of "why is git/Github asking for my username/password"?

Here is the sequence:

$ git push
remote: Permission to userEFGH/cagor.git denied to userABCD.
fatal: unable to access 'https://github.com/userEFGH/cagor.git/': The requested URL returned error: 403

So apparently I am logged in as the wrong user? I don't have any ssh keys configured on this machine, so why wouldn't git/Github then give me an opportunity to use username/password?

As you can see, git/Github thinks I am userABCD. I am trying to push to a repo owned by userEFGH.

But why does git/Github think I am userABCD, when I don't have any ssh keys on this machine? I have also never run git config --global x, TMK.

Just as an aside, I have two Github accounts, one is for userABCD and the other is userEFGH.

1 Answer 1

1

It's possible that git's configurations on your machine thinks that you're userABCD, to check this use the command git config --list this will show what user.name and user.email you're using. If userABCD is shown then you can change it with git config user.email [email protected], if you want this globally changed (meaning git in general and not just in your local repo) use git config --global user.email [email protected] Hope this helps you and/or others

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.