DEV Community

Chris Jarvis
Chris Jarvis Subscriber

Posted on

Revoke a Token on GitHub

On GitHub you have to update your personal access token every once in a while. When you create a new one it's only on screen once, If you navigate away it's gone. I had to deal with this recently.

Last time I needed a new token my browser froze. I clicked the generate a token button. The next window stalled out. No idea what the token was so I tried to generate another.

This time I was able to see and copy the token. I copied it and undated by Key chain. But I got an error message when I tried to use the token.

GitHub Co-pilot said I had to revoke the previous token.

  1. Go to setting > Developer Settings > Personal Access token.
    Under token locate and delete the tokens. I had two so deleted both.

  2. Then go back and generate a new token. This time no glitch.

  3. Update the Keychain.

  4. Run git push.

Finally it worked. So if you get stuck on GitHub read the documentation or ask Co-Pilot.

-$JarvisScript git commit -m "fixed a token"
Enter fullscreen mode Exit fullscreen mode

Top comments (0)