Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Bitbucket is a Web UI/Online Git repository manager. A cloud version of Bitbucket with Pipelines is now available.

General Uses:

...

  1. Login to the Bitbucket Cloud uconnbitbucket workspace with your NetID credentials:.

  2. You will need to either update the remote URLs for all repositories or re-clone them from Bitbucket Cloud. When cloning from Bitbucket Cloud for the first time, you will be prompted to grant access between the repository and your client. If you’re logged into the VPN, you may receive a “Could not resolve host: bitbucket.org” message. You will need to disconnect and clone your repository.

  3. In order to perform git operations over HTTPS, you will need to log in to Bitbucket cloud and create an app password (recommended) or upload the public key of an existing (or new) SSH key, as these were not migrated.

    1. To create an App Password:

      1. Click on the cog in the upper right-hand corner, select Personal Bitbucket settings.

      2. From the left navigation menu, select App passwords, then click on Create app password.

      3. You will need save it somewhere because it’s long. The app password might be required each time you pull/commit changes to the repository, especially if you use Visual Studio Code. Another option for pull/commit changes is SourceTree.  The password is automatically saved.

    2. You can also create an SSH key (more advanced). Keep in mind if you use multiple workstations, you’ll need to copy the key to each. The SSH Key persists.

Tips

...

  • Your Bitbucket username may be different than your NetID. Click on Account Settings to take note of your Bitbucket username.

  • Click on App authorizations to view which applications you have authorized.

  • If you have access to multiple workspaces in the cloud, click on your avatar in the upper right corner, then select the workspace to switch back and forth between workspaces.

  • If you are creating a new project, do not use a hyphen "-" as part of the project key.  You can use an underscore "_".

  • If you are creating new repositories, please add a unique value to the name.  For example, you can use the project key as a prefix.

  • If you experience an authentication error in SourceTree, you can delete this file: C:\Users\<netid>\AppData\Local\Atlassian\SourceTree\passwd.

  • If you cannot view repos within your projects (typically as a result of going back and forth to DC or Cloud), try clearing your cache. (Or test in private / incognito window.).

Bitbucket Pipelines:

Bitbucket pipelines is Atlassian’s CI/CD tool that is integrated with the cloud version of Bitbucket. It can aid users in creating powerful, automated workflows and deployments.

Pipelines:

  1. If you are deploying to an external server, make sure you contact (Zach Robert) to allow access to the university’s firewall for port 22 to your server from Bitbucket Cloud.

  2. There are two variables set at the workspace for the SSH Key, if required to deploy to an external server as we do today with Bamboo.

    1. $DEPLOY64_KEY is encoded.

    2. $DEPLOY_KEY is decoded.

  3. Scroll down to Pipelines>Settings and Enable Pipelines, if not already.

  4. Here’s an example bitbucket-pipelines.yml.file.

    1. Sample. This example will tar up a project then sftp to a server, then run the pre-generated script. You’ll need to modify it for your needs. Here’s a site that shows many examples on adding pipes to your file. This is just one way of writing the bitbucket-pipelines.yml.file.

    2. To add variables, go to Pipelines>Deployments and you’ll see several pre-defined environments that you add then to.

      1. SFTP_SERVER <server name>

      2. SFTP_USER deploy

    3. The default section below, will execute every time you commit files to the repository.

...

Next

Bitbucket Pipelines

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "bitbucketcloud"