Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'heroku' does not appear to be a git repository

Tags:

ssh

heroku

People also ask

Is Heroku integrated with Git?

Heroku integrates with GitHub to make it easy to deploy code living on GitHub to apps running on Heroku. When GitHub integration is configured for a Heroku app, Heroku can automatically build and release (if the build is successful) pushes to the specified GitHub repo.

How do I access Heroku repository?

Just go to https://dashboard.heroku.com/apps/YOUR_APP_NAME/deploy/heroku-git. If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key. Use Git to clone YOUR_APP_NAME's source code to your local machine.


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