PanteraSama
PanteraSama

Reputation: 85

Error "Fatal: Could not read from remote repository" git push - ssh key

When I push my repo it throws me the message:

$ git push origin master fatal: 'https // github.com / PanteraSama / landingPageResponsive.git' 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.

Investigating I configured the ssh key on github, But when I want to commit again it doesn't let me either. can you help me?

Upvotes: 5

Views: 5836

Answers (1)

bk2204
bk2204

Reputation: 76884

According to the output you've provided, your URL has spaces and is missing the colon after https. As a result, Git thinks of this as a relative local path and tries to push to it, but fails because that path doesn't exist.

You would fix this by running the following:

$ git remote set-url origin https://github.com/PanteraSama/landingPageResponsive.git

If you mistyped the output in your question and your URL is in fact correct in your code, then the likely issue is that this is a private repo and you don't have the proper credentials. SSH keys are used only for SSH access and aren't used for HTTPS, which uses a username and password (or more securely, a username and token).

Upvotes: 4

Related Questions