Connect Bitbucket Repository
Select Namespaces in the header navigation, then in the sidebar menu, select the namespace you need.
In the sidebar namespace menu, select Repositories.
Click New connection.
Provide a repository Name and other settings:
Remote repository URL – the SSH or HTTPS URL of the repository, e.g.,
git@bitbucket.org:MyCompany/my-project.git
orhttps://bitbucket.org/MyCompany/my-project.git
Repository web URL – the URL of the remote repository's web interface. CodeCanvas will show this link in the repository list. For example, this can be a link to the project's README file on Bitbucket.
Access control – specify who is allowed to view repository contents: Only selected users or All users.
In the case of Only selected users, you should synchronize this list with your Git hosting service. Learn more
If the repository doesn't require authentication, leave Anonymous in Authentication and click Connect. Otherwise, choose either SSH (for SSH authentication) or Password (for HTTPS authentication).
SSHPasswordFor SSH authentication, you need to provide an SSH key pair. CodeCanvas will use the private key only to clone the repository into dev environments. Users will be required to specify their own SSH key to pull from and push to the repository.
You can create a new SSH key pair manually or make CodeCanvas generate it for you.
Auto-generate keysGenerate keys manuallyIn the Authentication field, select SSH and ensure Auto-generate SSH keys is turned on.
Click Connect and copy the generated public key.
On Bitbucket, go to Repository settings | Access keys and click Add key. Paste the public key and click Add SSH key.
In CodeCanvas, you can now Test connection or Close the dialog. The repository will appear in the Repositories list.
First, generate a new SSH key pair for CodeCanvas on your local machine using:
ssh-keygen -t ed25519
Protect the private key with a passphrase if desired. You will have files such as
mykey
(private key) andmykey.pub
(public key).On Bitbucket, go to Repository settings | Access keys and click Add key. Paste the contents of the public key file (
mykey.pub
) and click Add SSH key.In CodeCanvas, in the Authentication field, select SSH and turn off Auto-generate SSH keys.
Provide the private key (
mykey
) and the passphrase if set.warning
Important! All dev environments in the namespace will use this key to clone the repository.
You can first Test connection, and if everything is OK, click Connect. After this, the repository will appear in the Repositories list.
warning
We don't recommend this authentication method as it implies using an app password associated with your Bitbucket account.
On Bitbucket, open Personal Bitbucket settings.
On the App passwords page, click Create app password.
In Repositories, select Read, create and copy the password.
Specify the password in CodeCanvas as a repository Password and your Bitbucket username as Username.
warning
Important! All dev environments in the namespace will use this password to clone the repository.
You can first Test connection, and if everything is OK, click Connect. After this, the repository will appear in the Repositories list.
Thanks for your feedback!