When I try to push my app to Heroku I get this response:
fatal: \'heroku\' does not appear to be a git repository
fatal: Could not read from remote repositor
In my case, I was already logged-in and I just executed git push
.
First, make sure you're logged into heroku:
heroku login
Enter your credentials.
It's common to get this error when using a cloned git repo onto a new machine. Even if your heroku credentials are already on the machine, there is no link between the cloned repo and heroku locally yet. To do this, cd into the root dir of the cloned repo and run
heroku git:remote -a yourapp
You could try the following in your root directory:
// initialize git for your project, add the changes and perform a commit
git init
git add .
git commit -m "first commit"
// create heroku app and push to heroku
heroku create
git push heroku master
Not sure where you are in the process. You also don't need github to deploy on heroku, just git. Hope this helps!
show all apps heroku have access with
heroku apps
And check you app exist then
execute heroku git:remote -a yourapp_exist
I got the same error and it turned out I was in the wrong directory. It's a simple mistake to make so double check that you are in the root and then run heroku create
and heroku git push master
again. Of course you must have done git init
, as mentioned in StickMaNX answer above, already before the heroku steps.
I encountered the same error making a much more novice mistake: I was typing in Heroku with a capital "H," instead of lowercase.
I recognize that's certainly not the solution for everyone who encounters this error, but it was in my case.