bpdg
bpdg

Reputation: 181

Git push results in "Could not read from remote repository"

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?

Upvotes: 1

Views: 155

Answers (2)

CuckooRain
CuckooRain

Reputation: 1

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 :)

Upvotes: 0

VonC
VonC

Reputation: 1329672

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

Upvotes: 4

Related Questions