1

I have been using Github for a little while and I have been fine with git add, git commit, and git push so far with no problems.

Suddenly I am having an error that says:

fatal: Could not read from remote repository.

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

In the terminal, I already repeated the ssh-keygen command 5 times already but still keep on getting this error message in the terminal. Also, I have tried with HTTP but every time I get:

fatal: Authentication failed for the repository.

Does anyone have any idea what the cause of this problem is and how I can fix it?

1
  • 2
    Multiple things could cause this. Do you actually have access? Does your ssh key match? Is ssh using the correct key? Commented Jan 10, 2020 at 0:36

2 Answers 2

4

Since GitHub status is green (nominal), the issue is on your side.

ssh-keygen will only influence repositories cloned with an SSH URL.
Check first you have correctly registered the public key with

ssh -Tv [email protected] 

For HTTP, check if you have credentials cached with git config credential.helper

Sign up to request clarification or add additional context in comments.

Comments

0

First, do:

sudo apt-get upgrade git 

and then use the tokens generated in your Github settings to resign to your account. It works for me :)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.