Using Bitbucket Cloud for hosting your code
If it’s the cloud you probably do not need to manage what’s underneath, Cloud technologies have come a far way and so do your code hosting platforms. You no longer need to set up a server and host your code collaboration tools, the cloud does it for you. Bitbucket Cloud is one such service, in the words of Atlassian it is “ a Git-based code hosting and collaboration tool on the cloud”.
But how do you get started with it? well, your prayers have been answered — let’s set up our very first Bitbucket Cloud Workspace.
The UI might differ from time to time but the core process remains the same.
Signing up for a Bitbucket account
Signing up for a Bitbucket account is similar to signing up for any other service like GitHub, Replit, etc.
You’ll receive a link in your inbox, verify it to access your newly created Bitbucket account.
Provide a username (Username must be unique across global Bitbucket accounts)
Voila! you have successfully created your new Bitbucket account. You should now be able to see your Profile Dashboard.
Creating your workspace
Workspace is your playground, it will contain your repositories, you can collaborate on your code, and organize different streams of work in your Bitbucket Cloud account. You can create multiple workspaces for various domains (For example different workspaces for different clients).
On your dashboard, click on Create workspace as shown in the above image then provide a name and visibility (private/public) to your workspace
Create a Project, it allows you to group all your repositories and manage permission. Provide all necessary details and click on Create project
Once you are inside your project, click on Create repository and provide all details related to your new repository.
You have now successfully created a repository, now let’s create some new files.
Click on the three dots next to the Clone button and choose Add file
Creating a simple python program and committing the changes.
Based on the process followed at your organization, your supervisor/senior might approve your commit. since this is our test account, we will see how to approve our own commit (you can choose to create a pull request when you are submitting contributions to a project that needs to be reviewed before inclusion in the repository). You should see the same button displaying option to unapprove once your press on Approve
You can then visit the repository dashboard and go to Commits tab on the left panel to see all the commits
You can also create a new branch by going to Branches > Create branch (Provide branch details and click on Create)
To provide access to a repository, you can go to the repository dashboard and select Repository settings > User and group access
Just add the username (if the user already exists in the workspace or email address of the user to send an invitation link) and select access type (Read/Write/Admin)
To provide a read-access to the user, you can also use the Access keys (go to Repository settings > Access keys > Add key)
Configuring Bitbucket access on your system
To manage Bitbucket from your system, you can access your repository via SSH/HTTPS
We’ll be using HTTPS for demonstration but you can also use SSH keys to access your repository. Clone your repository's URL
You can use any source control management tool and for demo try to clone your repository by the URL, You’ll get a pop-up to enter your Bitbucket account username and password
You should be able to see your repository being cloned, Use file explorer to verify the existence of your repository after completion.
So that’s how you get started with Bitbucket Cloud. Stay tuned for more 😉