Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting Heroku app to private GitHub repository for deploying on Heroku

Tags:

github

heroku

I have an organization's private GitHub repository that I am trying to connect a Heroku app to, using the Heroku Dashboard from a browser. In the settings of my GitHub account (that is linked to Heroku), under OAuth Applications, I can see Heroku Dashboard, and under Permissions, it says Full control of private repositories.

However, when I navigate to the Heroku app page and select this GitHub repo from the select-list and click Connect, I get the message:

Item could not be modified:
Admin access to repository required

On GitHub, my account has Write access for the repo. Moreover, as mentioned above, Heroku Dashboard has Full control of private repositories. Can anybody help me figure out what access needs to be granted where? I would really appreciate that.

like image 908
Ajoy Bhatia Avatar asked Aug 31 '16 23:08

Ajoy Bhatia


People also ask

Can I deploy private GitHub repo to Heroku?

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 deploy a private repo on Heroku?

Heroku Buttons for private GitHub repos work the same as public ones (though they will not be listed as a Heroku Element), and adding one is a simple two-step process: Add an app. json file. Add the Heroku Button HTML or MarkDown to the README or doc where you want your button.

How do I link a GitHub repo to Heroku?

Enabling GitHub Integration 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.

Why is Heroku not connecting to GitHub?

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.

How do I deploy a Heroku app to GitHub?

To connect a Heroku app with a GitHub repo, go to the app’s “Deploy” tab on Heroku Dashboard and select the GitHub pane. If you haven’t connected your Heroku and GitHub accounts, you will be prompted to complete the GitHub OAuth flow.

How do I Disconnect my Heroku and GitHub accounts?

You can disconnect your Heroku and GitHub accounts in the Applications pane on your Dashboard account page. Does the GitHub integration sync to my Heroku-hosted Git repo?

Does Heroku dashboard have control of private repositories?

Moreover, as mentioned above, Heroku Dashboard has Full control of private repositories. Can anybody help me figure out what access needs to be granted where? I would really appreciate that.

What is a review app in Heroku?

With review apps enabled for a Heroku app, Heroku will create temporary test apps for each pull request that’s opened on the GitHub repo that’s connected to the parent app. Review apps are great if you’re using GitHub Flow to propose, discuss, and merge changes to your code base.


1 Answers

Never mind. That private GitHub repo had been created by someone else who had since left the company. I had Write access but that is not enough. When I created a new GitHub repo and an app on Heroku myself, I could connect them without any issues.

like image 199
Ajoy Bhatia Avatar answered Sep 18 '22 18:09

Ajoy Bhatia