Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Authentication Failed - ... GitHub does not provide shell access

$ git remote add origin [email protected]:lut/EvolutionApp.git fatal: remote origin already exists.  $ git push -u origin master fatal: 'EvolutionApp' does not appear to be a git repository fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists. 

My keys were added succesfully

 $ ssh -T [email protected]  Hi lut! You've successfully authenticated, but GitHub does not provide shell access. 

The Github article https://help.github.com/articles/generating-ssh-keys/ says that "Shell access" should not be an issue? What could the problem be?

like image 851
Lut Avatar asked Nov 16 '14 02:11

Lut


People also ask

How do I fix git failed to authenticate to remote?

It happens if you change your login or password of git service account (Git). You need to change it in Windows Credentials Manager too. type "Credential Manager" in Windows Search menu open it. Windows Credentials Manager->Windows Credential and under Generic Credentials edit your git password.

Can Git pull authentication failed?

Usually, the “Authentication Failed” error happens if you recently enabled 2-Factor Authentication on your GitHub account and uses HTTPS to push/pull in Git at the same time. GitHub deprecates the password authentication method from August 13, 2021 to favor more secure way of authentication.

Could not read from remote repository make sure you have the correct access rights?

The Git “fatal: Could not read from remote repository” error occurs when there is an issue authenticating with a Git repository. This is common if you have incorrectly set up SSH authentication. To solve this error, make sure your SSH key is in your keychain and you connecting to a repository using the correct URL.


2 Answers

Try and redefine the ssh url for remote origin:

git remote set-url origin [email protected]:lut/EvolutionApp.git 

And try again.

Only git remote set-url can change an existing remote URL (as opposed to git remote add, to add a new remote name and URL)
Here, is issue was the URL of the existing origin: EvolutionApp: it needed to be replaced by a valid one.
Using git config url."ssh://[email protected]/".insteadOf https://github.com/ would not have helper, considering there was no HTTPS URL in the first place.

like image 115
VonC Avatar answered Oct 08 '22 14:10

VonC


You can add this in the ~/.gitconfig file.

[url "ssh://[email protected]/"]         insteadOf = https://github.com/ 

Now ssh will be used instead of https.

like image 26
Sudesh Chaudhary Avatar answered Oct 08 '22 14:10

Sudesh Chaudhary