How to register a GitHub Enterprise repository


#1

GitHub Enterprise is supported, and you can have the same features as with GitHub.com with two exceptions:

  1. You can’t use the automatic options during the Add New App process, you’ll have to manually specify the git clone URL, register the SSH key and the Webhook.
  2. Build status won’t be sent back to your server, so no build status indicator will be presented on the pull requests.

Setup

  1. Start the Add New App process
  2. At the first step (Connect your repository) select the Other / Manual option, and copy paste the SSH URL of the repository
  3. In the Setup repository access section copy the SSH key generated by Bitrise.io from the textfield and register it on your GitHub Enterprise account (most likely it’s enough to register it as a Repository Deploy key, but you’re free to register it for a user account too, e.g. to a “CI” user who has access to the repository / repositories you want to use on bitrise.io)
  4. Continue the process, just like you would in any other case

Once the registration is complete you can start builds manually.

To start builds automatically you have to register a Webhook.

  1. Go to the Code tab of the app on bitrise.io
  2. in the WEBHOOKS section select the GitHub option in the dropdown. This will generate a webhook URL for you in the format https://hooks.bitrise.io/h/github/....
  3. Register this webhook on your GitHub Enterprise as a webhook for the repository, and enable the Push and Pull request events for the webhook.

That’s all, once the webhook is registered your next code push will start a build on bitrise.io

If you’d have any questions just let us know!


Does bitrise support Github Enterprise?
#2

Is the feature planned, or is there any workaround in the meantime?


#3

Definitely planned, please vote & comment here, on the related Feature Request: GitHub Enterprise - Commit/PR Status API support


#4

@jcayzac Ohh, forgot to mention that there is a workaround for sending statuses back to GitHub Enterprise, you can use the GitHub Status step.

This can send the proper success/failed status back to your self hosted GitHub Enterprise, except in the case when the build would be aborted before this step would run, as this is a regular build step.
Just drop it to the end of the Workflow and fill out the required params (e.g. access token), that’s all :slight_smile:


#5

Hi, @viktorbenei

In order to clone Github Enterprise code,
I think that it is necessary to allow communication from Bitrise to Github Enterprise.
(Since Github Enterprise is basically behind the firewall)

Is there a way to securely connect Bitrise and Github Enterprise?

If simply allow it with source IP, I think that any user of Bitrise will have access to Github Enterprise.


#6

@justice3120 that depends on your own infra / servers. VPN might be a suitable solution:


#7

@viktorbenei
Thanks!
I will consider it in the direction of using VPN.


#8

@viktorbenei the workaround for PR integration is ok, however having this more integrated into Bitrise would be ideal. The status doesn’t get updated immediately when a build is queued up. Also, if the build is in an inactive state then the PR doesn’t get updated to reflect that.

I would really love to see this more integrated since many larger organizations use Github Enterprise.


#9

Definitely planned @marioharper - please vote & comment on the related #feature-request : GitHub Enterprise - Commit/PR Status API support