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!

0 Likes

Does bitrise support Github Enterprise?
#2

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

0 Likes

#3

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

0 Likes

#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:

1 Like

#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.

1 Like

Git status step failing with unsupported protocol scheme while updating in Github Enterprise
#6

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

0 Likes

#7

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

1 Like

#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.

1 Like

#9

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

0 Likes

#10

Hi Vik,

Was trying to configure Github Status step.
The problem is that, in Account settings, when I enable Github, it is connecting to GitHub but not to Github enterprise account. Due to which, it is not able to connect to repo hosted in Github Enterprise and update the build status. Could you assist, how I can connect to Github Enterprise account instead of Github in Account Settings. Please note that I’m not referring to GitHub enterprise connectivity… I have done the configuration and I’m able to clone my github enterprise repo and run the workflow. My goal is sending the build status back to the Pull request of the repo hosted in Github Enterprise.

0 Likes

#11

Hi @sowjanya-gurajada-Mi!

As we started discussing this in the other thread, you can not connect your GitHub Enterprise account the same way you could your regular GitHub account. The main reason for this being the difference in the nature of these services - the former one is online and we can easily access the information while the latter one is self-hosted and usually on a restricted network.

@viktorbenei is mentioning the GitHub Status step, exactly, because that would allow you to send back build status to your git repo.

0 Likes