6

I got informed by GitHub that I need to switch to token. I followed the guide and created a token. What the guide doesn't say is what I have to do on my local computer (I am running Linux). In the past I had configured my git

git config --global user.name "name"
git config --global user.email my@emailadress.com

In my ~/.git-credentials I do see my user and a hashed password.

What do I have to do to have token access?

  • Deleting .git-credentials didn't help, it was recreated
  • I run git config --global github.token ab7....aaa

Is it now using my token if no what do I have to do? If yes, can I remove my old hashed password from the local configuration?

Tom Smykowski
  • 25,487
  • 54
  • 159
  • 236
yuppie
  • 79
  • 3
  • 2
    if the duplicate does not solve your question, let me know with a comment – knittl Jan 16 '21 at 09:37
  • 3
    it doesn't answer my question, your first link is for windows, I am using Linux. The second link proposes to clone again I tried that and cloning works. But that means it uses my user/password for the clone since I created my token and now I don't know where to tell my local git where it is. Basically we are what someone posted in the second link "Laughably, the article tells you how to create it, but gives absolutely no clue what to do with it" – yuppie Jan 21 '21 at 14:55
  • the GitHub token works just like a regular password. Depending on your credential manager, you need to invalidate/delete your existing credentials for that user account. The next time you authenticate with the GitHub server, you should be asked for your token/password. – knittl Jan 21 '21 at 17:22
  • You can learn how to do it from here: https://tomaszs2.medium.com/how-to-switch-from-github-password-authentication-to-personal-access-token-6c306e32cc5d. Please vote for reopen, so people can answer. It is not a duplicate. – Tom Smykowski Sep 29 '21 at 08:57
  • This question's title is much more clear and specific than the other answers that it was marked as a duplicate of. Remember, just because two questions have the same resolution, does not mean that they are the same question: "what is 4-2" is different from "what is 1+1". – MRule May 10 '23 at 14:20
  • This should never have been flagged as a duplicate of the windows-related question. It's also not an exact duplicate of the Linux-related question, since it is reasonable to presume that the process for migrating a remote repo cloned under then username--password model might require special steps to migrate to the token-based model without re-cloning. – MRule May 10 '23 at 14:21

0 Answers0