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
Following official Heroku article:
Initialize GIT
$ cd myapp
$ git init
$ git add .
$ git commit -m "my first commit"
Then create (initialize) heroku app with:
$ heroku create YourAppName
Lastly add git remote:
$ heroku git:remote -a YourAppName
Now you can safely deploy your app with:
$ git push heroku master
You should wait for some time and see if you don't get any error/interrupt on console while deploying. For details look at heroku article.
Might be worth checking the config file in the .git folder. If the heroku parameters are missing then you´ll get this error heroku param
[remote "heroku"]
url = git@heroku.com:`[Your heroku app].git
fetch = +refs/heads/*:refs/remotes/heroku/*
the .git folder should be in the local computer file directory for the app you created in heroku. e.g C:\Users\You\Your app.git
Hope this helps
If this error pops up, its because there is no remote named Heroku. When you do a Heroku create, if the git remote doesn’t already exist, we automatically create one (assuming you are in a git repo). To view your remotes type in:
“git remote -v
”. # For an app called ‘appname’ you will see the following:
$ git remote -v
heroku git@heroku.com:appname.git (fetch)
heroku git@heroku.com:appname.git (push)
If you see a remote for your app, you can just “git push master
” and replace with the actual remote name.
If it’s missing, you can add the remote with the following command:
git remote add heroku git@heroku.com:appname.git
If you’ve already added a remote called Heroku, you may get an error like this:
fatal: remote heroku already exists.
so, then remove the existing remote and add it again with the above command:
git remote rm heroku
Hope this helps…
I've seen all the answers here and the only thing missing is after going through these steps:
$ git add .
$ git commit -m "first heroku commit"
You should run the command below:
$ heroku git:remote -a <YourAppNameOnHeroku>
And lastly, run this:
$ git push -f heroku <NameOfBranch>:master
Notice I used <NameOfBranch> because if you're currently in a different branch to master it would still throw errors, so If you are working in master use master, else put the name of the branch there.
I had to run the Windows Command Prompt with Administrator privileges
For me the answer was to cd into the root directory of the app before running heroku create
or git push heroku master