Authorisation required when I push to repo


I am having a strange issue at the moment, this is not something I have experienced previously. I created a new repo and added my first commit with no issues. But, when I went to push to the repo a couple of hours later, a small window appeared asking me to log in. I entered the correct details (I double checked to make sure) and it showed as log in failed. If anyone can help that would be great as I have no idea what to do next.

Thanks In Advance

:wave: Welcome!

Could you tell us more about how you’re pushing the repo?

The most common reason we see this kind of confusion is that you’re using your password where you should be using a personal access token. So it may be worth trying that, especially if you have recently enabled 2FA, for instance.

If that’s not it, then more information about what you’re using to push your repo, OS, etc would be very useful! Screenshots are also great, just make sure there aren’t any passwords or personal information, like full email addresses - they’ll get removed.

Hi canuckjacq,

Thank you for taking the time to reply

Unfortunately it did not work, it still showed as login failed, but I noticed it asked my for my email or username in the cmd, so I entered my username and then it asked for my password but when I started typing nothing showed up?

Please see the screenshots I have taken for your info, the small login window on the right side is what shows up after I try to push. I entered my username and the personal access token there and the login failed, I then enter my username in the cmd and it asks for a password but I cannot type anything. At this moment in time I am unable to add screenshots as I am a new user, not sure what that’s all about

Thanks In Advance


Just for your info this is the process I go through when pushing to my repo:

git init
git add .
git commit -m “first commit”
git remote add origin (url goes here)
git push -u origin master

It is normal that no typing is shown in a terminal application when you are entering sensitive text, like a password or a token.

Try that again with entering your token (you can also paste when prompted for a password) and see what happens.

The pop up window makes it sound like it might be a credential manager? If you use Windows, it may be worth checking if you have a GitHub entry in your Windows Credential Manager and updating it with your token.

Ok so we have made progress, it still showed as log in failed when typing my username and password into the pop up window but when I added my token to the credential manager and then entered my username and pasted my token into the cmd it updated my repo, but this is now showing up:

git: ‘credential-cache’ is not a git command. See ‘git --help’.

Is this something I need to worry about?