1

I am not able to pull and push after changing my user on git. Previously, I have access to repo with a username say ABC, then removed that user access and given access to my other user XYZ.

But after that, I am not able to pull and push anything in that repo. I have already tried several options like setting upstream, setting origin and all.

This is the error I am receiving:

remote: Repository not found.
fatal: repository 'https://github.com/something/something.git/' not found
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Surjeet Bhadauriya
  • 6,755
  • 3
  • 34
  • 52

1 Answers1

2

If GitHub responds with a "not found" error, that means:

  • either the URL isn't exactly right (like uppercase/lowercase error in it)
  • or it is a private repository, and the user automatically associated with that URL is not the right one.

In the second case, check your git config credential.helper: if set, that means your old user credential might still be cached for that URL.
You need to remove that entry from your credential helper (example for Windows here, or: git credential-manager reject https://github.com/something/something.git )

Then your next push will ask you the credentials again: this time, enter the new user.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250