Question

our server currently use an account of an employee which has just resigned and due to that his account is disabled.

git config --list when i run this command it seems it is displaying all of my information which i just set.

but when i pull/push/fetch etc i get the error

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

and when i run this command ssh -T git@github.com it is saying:

Hi resigned employee! You've successfully authenticated, but GitHub does not provide shell access.

what should i change for the repo to use my account?

Était-ce utile?

La solution

If you are using ssh, you need to change the public/private key stored in the server account ~/.ssh folder in order to use your own public key, and not the ssh key of the "resigned employee".
You need to generate your own set of ssh keys.
See this Gist for an example.

Check also if that old key is still offered by ssh-agent (that happens if your private key is passphrase protected): see "Having Trouble Switching Github accounts on terminal" for more.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top