git fatal error when pushing md file to Github

262 views Asked by At

This is driving me crazy. I'm running git on mac osx 10.10.3

I keep getting "does not appear to be a git repository" message when trying to upload an MD file to github, here's what I get:

git push origin master fatal: 'github.com/bbenavides/datasciencecoursera.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.

Any help appreciated thank you.

The repository in question

1

There are 1 answers

0
Chris On BEST ANSWER

It looks like your remote isn't configured properly. You can view your configured remotes with

git remote -v

GitHub remotes generally look like

  • [email protected]:user/repo.git for SSH connections (note the git@ and :), or
  • https://github.com/user/repo.git (note the https://) for HTTP connections

Your remote appears to be an HTTP remote without the protocol portion.

To update your remote (assuming its name is origin; you can see this in the output of git remote -v from before):

git remote set-url origin https://github.com/bbenavides/datasciencecoursera.git
git remote set-url --push origin https://github.com/bbenavides/datasciencecoursera.git

It's usually best to copy the URL directly from GitHub, which helps to prevent these kinds of typos.