Skip to main content

Bitbucket

BeetleboxCI also supports Bitbucket. You can use SSH keys or username/password authentication in order link your code repositories to your installation of BeetleboxCI.

Adding a Public Bitbucket Repository to BeetleboxCI

  1. On the pipelines page of BeetleboxCI in your browser: If you do not already have any pipelines in BeetleboxCI, click 'Create your first pipeline'. Otherwise, click "Create Pipeline" at the bottom of the pipelines page.
  2. In the following screen, fill in the following:
  • Project Name: [Name of your Bitbucket repository]

  • Repository URL: https://bitbucket.org/<workspace>/<reponame>.git

    The authentication settings can be left blank since they are not necessary when adding a public repository.

  1. Click proceed. You will now be redirected to the pipelines page where you can see the project that you just created.

Adding a Private Bitbucket Repository to BeetleboxCI

When you add a project from a private repository to BeetleboxCI, you will need to provide either:

  • A Bitbucket username and access token (https authentication)
  • A private SSH key to BeetleboxCI (plus adding the public key to Bitbucket)

You can find more information further down this page about how to create personal access tokens and set up SSH keys.

  1. On the pipelines page of BeetleboxCI in your browser: If you do not already have any pipelines in BeetleboxCI, click 'Create your first pipeline'. Otherwise, click "Create Pipeline" at the bottom of the pipelines page.
  2. In the following screen, fill in the form in one of the following ways, depending on which form of authentication you wish to use (either App password, Repository access token or SSH)
  • Project Name: [Name of your Bitbucket repository]
  • Repository URL: https://bitbucket.org/<workspace>/<reponame>.git or git@bitbucket.org:<workspace>/<reponame>.git
  1. Also fill in either the "Authentication settings" section OR the "SSH Authentication" section. You will need need to use username and token authentication if you chose the https URL or SSH authentication if you chose the SSH URL.
  • Authentication Settings — Username: <Bitbucket username>

  • Authentication Settings — Password: <Bitbucket app password>

  • SSH Authentication — SSH private key

  1. Click proceed. You will now be redirected to the pipelines page where you can see the project that you just created.

Create a Bitbucket app password

  1. On the Bitbucket website, click the cog next to your avatar on the top right of the page and click Personal Bitbucket settings.
  2. Click App passwords on the left hand sidebar.
  3. Click Create app password
  4. Choose a name for the password in the label field.
  5. Add permissions to allow this password to read repositories.
  6. Click Create
  7. Your new app password will appear. Note down the password somewhere safe, since you will not be able to see it again

Bitbucket Repository Access Tokens

BeetleboxCI does not currently support access tokens for individual repositories on Bitbucket.

SSH Keys

Generate an SSH Key

These commands are identical for both Windows and Linux.

  1. Open a terminal in Linux or Powershell in Windows.
  2. Input the command below, replacing the email address with the email that you have registered on Github:
ssh-keygen -t ed25519 -C "your_email@example.com"
  1. You will be prompted to enter a location to save the key. Press Enter to accept the default location which is shown.
  2. When prompted, enter a secure passphrase.
  3. Now two files will have been generated, and you can browse to the location where you saved them in Step 3 to find them. The file ending in .pub contains the public key which will need to be added as a deploy key either to you Github account or just to a Github repository. The private key can be added during the pipeline creation process in BeetleboxCI, as a means of authentication.

More information generating SSH keys for Bitbucket can be found on this link.

Add a public key (deploy key) to a Bitbucket repository

This will provide authentication for just this repository.

  1. Browse to the repository to which you want to add the key.

  2. Click Repository settings in the left-hand sidebar.

  3. In the left-hand sidebar, click Access keys.

  4. Click Add key to open the Add SSH key dialog

  5. Copy and paste the public key into the Key field and choose a name for the key in the Label field.

    The public key will be similar to:

    ssh-ed25529 M3AGUEr7YVcArc00zSx3WWfY0Kxkb4tNL3BE8020XRwcrE6MBtUXQsKHab3rZt4qSEF62Z user@example.com

  6. Click Add SSH key

  7. The key you just added will be listed on the Access Keys page that you are on.

More information can be found from the links in this document.

Add a public key to your Bitbucket account

This will allow access to all the repositories which your account is able to access.

  1. On the Bitbucket website, click your avatar on the top right of the page and click Personal settings.

  2. Click SSH keys on the left hand sidebar.

  3. Click Add key to open the Add SSH key dialog

  4. Copy and paste the public key into the Key field and choose a name for the key in the Label field.

    The public key will be similar to:

    ssh-ed25529 M3AGUEr7YVcArc00zSx3WWfY0Kxkb4tNL3BE8020XRwcrE6MBtUXQsKHab3rZt4qSEF62Z user@example.com

  5. Click Add key

  6. The key you just added will be listed on the SSH Keys page that you are on. If you receive an error saying that the key is invalid, make sure it is the public key you pasted, and not the private key.

More information about adding keys to your account can be found from the links about setting up personal SSH keys at the bottom of this document.