1

I just got started on Github again, and created a new repo. It's a private repo, so I use git clone <URL_clone_link>, and it prompts for username and password (both of which I've verified are correct), but ends with the fatal error in the Title.

I'm using a terminal on a relatively new iMac, and it doesn't seem to be a local machine issue. I just don't understand why it won't authenticate me using the same username/pwd I use to log in.

pbkac
  • 39
  • 7

1 Answers1

1

First, check that, as commented, you have 2FA activated.
If yes, the password to enter would be a PAT (Personal Access Token) that you would need to generate and add to your tokens.

Second, check your git config credential.helper output: if osxkeychaiy, you might need to do:

 git credential-osxkeychain erase https://github.com

In order to remove the password cached by the osxkeychain credential caching setup.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks - I will give this a shot and let you know if this worked (waiting on verification code for fallback SMS.. not very quick) – pbkac Apr 08 '20 at 01:33
  • The `osxkeychain` value was there after running `git config credential.helper`. I ran the erase command you mentioned, it's been sitting here running for about 10 minutes now, is this typical? Will update here if it finishes and I can try another clone. – pbkac Apr 10 '20 at 01:32
  • I can't post I pic in the comments.. but the cursor is just sitting on the next line in the terminal, like it's trying to do what I asked but is just taking forever. – pbkac Apr 10 '20 at 02:02
  • The erase command should take less than a second to execute. What version of git are you using? – VonC Apr 10 '20 at 03:04
  • `git version 2.17.0` – pbkac Apr 10 '20 at 22:20
  • Is it possible for you to upgrade to git 2.26, and see if the issue persists? – VonC Apr 11 '20 at 03:02
  • Will give it a shot. I wonder if I can use home brew to update, or just download the latest from git-scm.com? – pbkac Apr 11 '20 at 17:29
  • @pbkac `brew` works, provided you add a `brew link`: https://stackoverflow.com/a/60696298/6309 (same as in https://medium.com/@katopz/how-to-upgrade-git-ff00ea12be18) – VonC Apr 11 '20 at 18:00
  • `brew` worked awesome, now on `git version 2.26.0`. Quit and re-opened the terminal to run that command, because it froze up again after I updated. Tried running it again and ... same thing. Not sure what my Mac is trying to do .. I'm assuming I don't need `sudo` to run any git commands. – pbkac Apr 12 '20 at 19:29
  • @pbkac Strange. So `git credential-osxkeychain erase https://github.com` is frozen? – VonC Apr 12 '20 at 20:14
  • Yeah... even after a restart and a recent Mac OSX update. Cursor just sits and blinks on the next line. – pbkac Apr 13 '20 at 21:08