0

I am using GitHub Desktop to clone repos because of the whole terminal auth deprecation. Usually when I clone a repo using GitHub Desktop, I am able to run the usual git commands from the terminal in VSCode. However this time, for some unknown reason, I cannot.

For example, I get the error:

~/repos/my-repo (main) $ git pull
remote: Repository not found.
fatal: repository 'https://github.com/username/my-repo.git/' not found

What do I have to do to get the auth working in the terminal?

I am signed in on both browser and GitHub Desktop in the correct account btw.

abc
  • 1,141
  • 12
  • 29

1 Answers1

0

I did some digging and found out that it's due to having old session states. To solve it, you need to remove all github.com credentials from the system.

For Windows (especially 10):

  1. Open Control Panel.
  2. Select 'User Accounts'.
  3. Select 'Credential Manager'.
  4. Delete all the github.com or git credentials from Web (if there is) and Windows Credentials.

For Mac:

  1. Open Keychain Access.
  2. Delete the github.com password.
I.M. Adil
  • 414
  • 4
  • 9
  • I deleted all my GitHub passwords from keychain. Issue persists. – abc Nov 05 '21 at 17:27
  • @abc Hmm, how about removing the origin and re-adding it? `git remote remove origin` and then `git remote set-url origin https://github.com/myUsername/my-repo.git` – I.M. Adil Nov 06 '21 at 05:17
  • issue persists. Also I had to use `git remote add origin https://github.com/... .git` instead – abc Nov 06 '21 at 20:39