magit / ghub

Client libraries for the APIs of various Git forges

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to use regenerated GitHub token

shindere opened this issue · comments

GitHub requested me to regenerate my access tokens so that they are in
the new format.

I had two of them, one for ghub/forge, the other for another package.

For the other token things worked: I replaced old one by the freshly
generated one in the appropriate configuraiton file and things work as
expected.

For ghub/forge, though, although I followed a similar proces (copy freshly
regenerated access token to clipboard and from there to the .authinfo file
in place of the old token, Things don't work and when I try to e.g. pull
from a repo I get:

error in process filter: HTTP Error: 401, "Unauthorized", "/graphql", ((messag
 . "Bad credentials") (documentation_url . "https://docs.github.com/graphql"))

I did read the documentation again, so any help would be greatly
appreciated.

Thanks!

My best guess is that you truncated the token when copying it, so I would recommend just doing it one more time.

Now I wonder whether I have two copies of the database for that
repository, one with the former token and one with the new one.

That shouldn't make a difference since no authentication information is stored their. But auth-source supports various locations to store and retrieve tokens/passwords and if you configure which of those it should use but that configuration does not always take hold, then that could be an explanation.