Two among the most popular source control providers are GitHub and Bitbucket. Both these providers offer free repositories and it is not uncommon for software teams to have few of their projects on GitHub and few others on Bitbucket. So if you are a developer who has accounts with both GitHub/Bitbucket and looking to run Continuous Integration on projects hosted on both of these source control providers, this tutorial will help you acheive it in an easy way.
First, let's take a brief look at how source control providers are used. Software developers use web-based, hosted source code systems for software projects, to leverage functions such as distributed revision control, bug tracking, source code management and wiki-based documentation. The source code repositories store large amounts of software source code, kept either publicly (for open source projects) or privately and enable multiple developers to collaborate on the code.
Shippable - the fastest platform for Continuous Integration (CI) and Continuous Delivery (CD) supports both GitHub and Bitbucket. We also support integration with other source control providers.
In this tutorial, I'll walk you through linking your GitHub and Bitbucket accounts, that'll enable developers to run CI/CD for software projects hosted on either of these source control providers, with a single login/account.
Before you begin
Ensure you have:
Connect GitHub and Bitbucket accounts
- Pick either of your GitHub or Bitbucket accounts as a primary account and sign into Shippable with the primary account credentials. For this tutorial, I'll use GitHub as my primary account.
- Click 'Account Settings' on the top right hand corner.
- Scroll down to the 'Git Identities' section.
- If your primary account used to sign in is GitHub, you'll see 'Enable' for Bitbucket. Vice-versa if the other way around.
- Follow the authorization flow (for Bitbucket, in this tutorial) by providing the second source control provider credentials.
- Click 'Grant access' to authorize Shippable with access to your repositories.
Once both the accounts are connected, you will see both your accounts under 'Subscriptions'. Select either one to enable projects from that source control provider.
For subsequent logins into Shippable, use either of source control providers credentials.
- Prior to linking the accounts, if you have logged into Shippable using GitHub AND logged in using Bitbucket, you will be unable to link the accounts using the above method. To enable the linking of the accounts in such an instance, open a support issue with a request to delete one of the source control provider accounts within Shippable. Upon deletion, follow the above steps with the existing account to successfully link both the accounts.
- To see the linked account repositories updated immediately, click on the 'Sync' button in 'Account Settings'
Now that I've successfully linked my GitHub & Bitbucket accounts, I have access to repositories on both these source control providers on the Shippable CI/CID platform.