Andrea
Andrea

Reputation: 179

How can I use an existing git repository in heroku

I'm using heroku for creating a web application in python-django. I need to use an existing git repository in heroku. The name of my repository is first-blog. When I'm using

git clone https://github.com/heroku/first-blog.git

I got

Cloning into 'first-blog'...
Username for 'https://github.com': AparnaBalagopal
Password for 'https://[email protected]': 
remote: Repository not found.
fatal: repository 'https://github.com/heroku/first-blog.git/' not found

this. I connect my github to the heroku account. How can I possible to connect this repository to my app in heroku.

Upvotes: 1

Views: 576

Answers (2)

rdegges
rdegges

Reputation: 33824

It looks like you're trying to clone a non-existent Git repository, which is why you're seeing that error. As some other users have mentioned already, you need to make sure you've got the right Github URL first of all, then you will be able to clone the repository no problem.

Once you've cloned the repository down locally, you can deploy it to Heroku by doing the following:

cd <directory-name>
heroku create
git push heroku master
heroku open

The above commands will:

  • Move you into the project directory you just downloaded (make sure you use the right directory name).
  • Create a new Heroku project.
  • Push your code to Heroku and deploy it.
  • Open up your new Heroku app in your web browser.

You may also need to install Heroku addons (like Postgres, etc.) if your project requires it. You can do this by running:

heroku addons:create <addon-name>

That should do it!

Upvotes: 0

Dmitry Torba
Dmitry Torba

Reputation: 3194

The repository you are trying to clone does not exist, you'd get the same result trying to clone it on your local machine.

You probably meant to clone https://github.com/AparnaBalagopal/first-blo‌​g.git

Upvotes: 1

Related Questions