0

My github token expired recently, which I had to generate a fresh one. I however haven't been able to push to the remote git server since then. I get the error:

fatal: unable to access 'https://github.com/xx/yy/': 
The requested URL returned error: 403

I also don't get a prompt to sign in. I can pull from a repo but I cannot push. How can I make my cli prompt me to input my github password/ access token? I'm using a macbook m1-pro

matt
  • 515,959
  • 87
  • 875
  • 1,141
mykoman
  • 1,715
  • 1
  • 19
  • 33
  • It's not prompting you because the old token still exists on your machine — and is now wrong. So just delete or replace it. Even better would be to stop using https access completely. – matt May 15 '22 at 21:13
  • This will depend on your OS and credential manager. On Windows, I have to go into the Windows Credentials Manager to update a stored password like this. @FocusRS gave you an answer for Mac. If your OS is another one, let us know. – joanis May 16 '22 at 00:41

1 Answers1

2

You can manually remove the old password using Keychain Access app. Rightclick on entry and choose "delete github.com". Then cli will ask you to re-enter credentials.

Keychain access screenshot

matt
  • 515,959
  • 87
  • 875
  • 1,141