Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link Heroku app to private Github Repo?

Tags:

git

github

heroku

I'm new to Heroku and I'm not familiar with the Deploy/Pipeline verbiage.

I already have the Heroku CLI installed and I deployed an app using:

run: heroku create myNewHerokuApp

My instance is now made.

I have a private repo on Github.

https://github.com/myUserName/myPrivateRepoName.git

How do I link my myNewHerokuApp with myPrivateRepoName.git?

like image 319
Lance Samaria Avatar asked Jan 01 '17 18:01

Lance Samaria


People also ask

Does Heroku work with private repos?

Heroku Button is no longer limited to source code hosted in public GitHub repos. It now works with both public and private GitHub repos.

How do I link a GitHub repo to Heroku?

You can configure GitHub integration in the Deploy tab of apps in the Heroku Dashboard. To configure GitHub integration, you have to authenticate with GitHub. You only have to do this once per Heroku account. GitHub repo admin access is required for you to configure automatic GitHub deploys.

Can't connect to GitHub in Heroku?

We are unable to access this connected repository on GitHub The authorization key is not valid, or the account used to connect to GitHub doesn't have access to the repository. Try disconnecting the repository above and then reconnect. That is the error I got when trying to connect my private GitHub repo to Heroku.


2 Answers

As mentioned in the documentation.

You can configure GitHub integration in the Deploy tab of apps in the Heroku Dashboard. To configure GitHub integration, you have to authenticate with GitHub. You only have to do this once per Heroku account.

After that you can find public or private repo in this panel: enter image description here

like image 124
user3655884 Avatar answered Oct 02 '22 08:10

user3655884


Here is a link from heroku's documentation that tells you exactly how to do this , follow these steps and you will connect your repo with your heroku app

https://devcenter.heroku.com/articles/github-integration

like image 43
Fady Sadek Avatar answered Sep 28 '22 08:09

Fady Sadek