'heroku' does not appear to be a git repository
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 repository.
Please make sure you have the correct access rights
and the repository exists.
I have tried 'heroku keys:add' but still comes up with the same result. I already have an ssh key for my GitHub account.
To add a Heroku app as a Git remote, you need to execute heroku git:remote -a yourapp
.
Source: Deploying with Git
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!
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
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.
Follow this steps:
$ heroku login
Create a new Git repository
Initialize a git repository in a new or existing directory
$ cd my-project/
$ git init
$ heroku git:remote -a appname
Deploy your application
Commit your code to the repository and deploy it to Heroku using Git.
$ git add .
$ git commit -am "make it better"
$ git push heroku master
Existing Git repository
For existing repositories, simply add the heroku remote
$ heroku git:remote -a appname