Skip to content

Instantly share code, notes, and snippets.

Last active April 8, 2019 08:27
What would you like to do?
Resolving Heroku/Git push deployment errors.

This is how to resolve the following command line error message when pushing your app to Heroku:

~/Desktop/appname git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
fatal: 'heroku' does not appear to be a git repository
Please make sure you have the correct access rights and the repository exists.

The above error message appears because there's no remote named heroku. When you do a heroku create, if the git remote doesn't already exist, Heroku automatically creates one assuming you're in a git repo.

You can see your remotes by typing git remote -v. For my app app I see the following when checking which remote's exist:

~/Desktop/appname git remote -v
origin (fetch)
origin (push)

If you see a remote for your app, you can git push master and replace with the actual remote name.

$ git remote -v
heroku (fetch)
heroku (push)

If the remote's missing, like it was for me, you can add the remote with the following command:

git remote add heroku

Copy link

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment