Search code examples
ibm-clouddevops-services

Can I configure a Bluemix Continuous Delivery toolchain to use a private Github repository?


I have a private Github repository in a private Github organisation, and I'd like to configure Bluemix's "Continuous Integration" service to use that repository so that I can load source code from it to build in a delivery pipeline in that toolchain.

The "View docs" link for the GitHub tile in the toolchain points to a documentation page for the older DevOps Services, which doesn't give any information on configuring a GitHub repository in a toolchain.

When I try entering the URL for my repo, it comes up with this error:

The integration could not be set up. Check the settings and try again.

Reason: An error occurred while cloning the git repository. Error details: Unable to read the repository on: (URL removed). User is not authorized, or repository does not exist.

I'd expect to be given the option to authorise Bluemix against my account, but I'm not.

How can I access this repository?


Solution

  • It is possible to set up an integration with a private GitHub repository as long as you have authorized Bluemix with your GitHub account and have granted Bluemix permission in the org that owns the repo.

    The first time you attempt to create a GitHub integration, you will be prompted to authorize with GitHub. On the GitHub authorization page, you have the option to select the orgs that you want to give Bluemix access to before you click the "Authorize" button.

    It sounds like you've already gone through the initial authorization step and may have missed adding the org authorization. You can update the org authorization on GitHub's authorized applications page (https://github.com/settings/applications). Click the "IBM Bluemix Toolchains" application. On that page, under "Organization Access", grant access to the organization that owns the repo you want to integrate with. That should allow you to set up the integration.