What is Bitbucket?
Bitbucket is a web-based hosting service for version control repositories. It supports both Mercurial and Git repositories. Bitbucket provides a centralized platform for developers to collaborate on code, offering features such as pull requests, code reviews, and branching. Teams widely use it for source code management and collaboration on software projects.
Features
Bitbucket, a Git-based code hosting platform, offers numerous features that cater to team-based software development workflows. Here are some of its key features:
Branch Permissions: Bitbucket’s branch permissions feature lets you control who can write or merge to any branch. You can create permissions for a specific branch type or pattern. For example, you can limit access to all branches with names like PROJECT-1234.
Git Mastery: Bitbucket goes beyond just supporting Git; it empowers developers with a user-friendly interface to navigate branches, commits, and the overall codebase. It streamlines Git workflows, making it easier for beginners and experienced users to learn efficiently.
Pipelines: Bitbucket Pipelines is an integrated CI/CD service built into Bitbucket Cloud. It allows you to automatically build, test, and even deploy your code based on a configuration file in your repository. It also offers language-specific templates for easy setup and configuration.
Branching Granularity: Bitbucket offers different branching modules (feature branches, topic branches) to suit specific development needs. You can create, manage, and merge branches with clear visualizations and conflict resolution tools.
Code Review on Steriods: Bitbucket’s pull request system facilitates a robust code review process. Reviewers can comment on specific lines of code, compare changes with side-by-side diffs, and even propose inline edits. This fosters collaboration, improves code quality, and helps identify potential issues early on.
Audit Trails for Accountability: Bitbucket keeps a comprehensive record of all code changes and user activity. This allows teams to track who made what changes and when providing valuable insights for project management and security processes.
Atlassian Ecosystem: Bitbucket integrates with other Atlassian products like Jira and Trello. Linking code commits to Jira issues creates a seamless workflow for tracking bugs and managing projects. Similarly, Bitbucket integrates with Trello to better visualize the development process.
Issue Tracking: Beyond linking commits to issues, Bitbucket lets you view issue details and comments directly within the code review interface. This provides context for code changes and streamlines communication between developers and project managers.
Centralized Knowledge Base: Bitbucket allows teams to create and maintain project wikis directly within repositories. This centralized important project information like documentation, design specs, and usage guides, making it easily accessible to all team members.
Free Plan Advantage: The free plan for small teams provides a cost-effective way to start with version control and collaboration. This is a great option for open-source projects or small development teams.
Large File Management: Bitbucket efficiently handles large files like images, videos, or datasets within code repositories. This eliminates the need for separate file storage solutions and keeps all project assets in one place.
Flexible Architecture: Bitbucket offers various sign-in options besides traditional usernames and passwords. Developers can leverage existing credentials from Google, GitHub, or social media accounts for a more streamlined login experience.
Projects: Bitbucket projects are a way to organize your repositories and apply the same configuration to those repositories, like access, branching strategy, default reviewers, etc, instead of having to do that for each repository.
IDE Integrations: Bitbucket integrates with some of the best fully functional cloud IDEs with desktop-quality coding experiences. These cloud IDEs offer automatic configuration of code libraries and build server and deployment integrations.
Deployment Permissions: Bitbucket allows you to configure deployment permissions to control who can do deployments, and from which branch, as a premium feature of Bitbucket Pipelines.
Build Integrations: Bitbucket can show build results from your CI system. A simple pass or fail icon tells you about the health of your code.
Pipes: Bitbuckey pipes lets you build powerful, automated CI/CD pipelines with preconfigured or custom pipes for hosting, monitoring, incident management, and more.
Benefits
BitBucket offers several advantages making it a popular choice for code hosting and collaboration, especially among development teams. Here are some of its key benefits:
Cloud-Based Service: BitBucket is a cloud-based service, meaning it’s accessible from anywhere and doesn’t require you to maintain any server infrastructure. It provides a cloud-based Git repository hosting service, which helps developers store and manage their code.
Free for Small Teams and Educational Use: BitBucket provides unlimited repositories for teams of up to 5 users, making it a cost-effective option for startups and small businesses. Students and educators can also benefit from this free tier.
Seamless Git Integration: Built on Git, a popular version control system, BitBucket offers a user-friendly interface for managing code versions, tracking changes, and collaborating with teammates.
User-Friendly Interface: BitBucket’s interface is designed to be user-friendly, making it easier for even novice coders to take advantage of Git. However, some users report that BitBucket’s user interface is less intuitive than other platforms.
Strong Code Collaboration: BitBucket includes a robust code review system that allows developers to review and comment on code changes before merging into the main codebase. This feature helps to improve code quality and identify potential issues early on.
Integration with Atlassian Tools: BitBucket integrates seamlessly with other Atlassian products, such as Jira (issue tracking) and Trello (project management). This integration allows developers to track bugs, manage tasks, and collaborate more effectively within a single platform.
Built-in CI/CD Pipelines: BitBucket Pipelines is a built-in continuous integration and continuous delivery (CI/CD) tool that allows developers to automate the process of building, testing, and deploying code. This will streamline the development process and improve release efficiency.
Secure Code Hosting: BitBucket offers a secure platform for hosting code, with features such as access controls and encryption to protect sensitive information.
Version Control: BitBucket supports version control solutions for Git. A version control system tracks and manages changes to a filesystem. BitBucket allows you to create a pull request, where code review occurs.
Security: BitBucket provides advanced security features. Repositories are encrypted at rest (AES-256) and encrypted in transit (TLS 1.2+) so your code is always secure.
Flexible pricing: For larger teams or those with more complex needs, Bitbucket offers paid plans that provide additional features and storage space.
Drawbacks
While BitBucket is a popular code hosting platform, it does have some drawbacks to consider:
Performance: BitBucket has been reported to have performance issues. Users have experienced slow response times and bottlenecks, particularly when reviewing pull requests. On March 11, 2024, BitBucket reported a service degradation due to high resource utilization on one of their databases. This indicates that BitBucket’s performance can be affected by high loads or resource-intensive operations. To mitigate such issues, users should monitor system metrics, check system logs for errors, and consider scaling up hardware resources or optimizing configuration settings.
Free Tier Limitations: Unlike Github’s free tier with unlimited public repositories and limited private ones, Bitbucket’s free plan restricts the number of users and private repositories. This can be a dealbreaker for small teams or open-source projects that rely on private code storage.
Per-User Pricing: Bitbucket’s paid plans charge per user, which can become expensive for larger teams. This pricing structure can make it difficult to scale efficiently as your team grows.
Limited Third-Party Apps: Unlike Github’s vast integrations marketplace, Bitbucket offers a smaller selection. This can be problematic if your team relies on specific tools for tasks like project management, continuous integration/continuous delivery (CI/CD), or code analysis.
Configuration Complexity: Integrating existing tools with Bitbucket can sometimes be more complex than other platforms. This can lead to time-consuming setup processes and potential compatibility issues.
Outdated Design: Some users find Bitbucket’s interface to be dated and less user-friendly compared to more modern platforms like Gitlab. This can make it less intuitive for new users to learn and navigate efficiently.
Finding Desired Features: Locating specific settings or functionalities within the interface can be challenging due to a potentially unclear layout. This can hinder workflow and productivity.
Less Powerful Than Dedicated Solutions: While Bitbucket offers basic issue-tracking features, they might not be as robust as dedicated bug-tracking tools like Jira. This can be a drawback for teams needing a more comprehensive system for managing bugs, tasks, and project workflows.
Limited Search Capabilities: BitBucket’s code search functionality has been reported to have limitations. For instance, search results are limited to the main branch in a repository, and only files smaller than 320 KB are indexed. Additionally, wildcard searches are not supported, and certain characters are stripped from search terms. These limitations can make it more difficult for developers to find specific snippets or files.
Continuous Integration/Continuous Deployment (CI/CD): BitBucket offers integrated CI/CD with BitBucket Pipelines, but it is often perceived as less powerful and versatile than other standalone CI/CD tools or integrations. BitBucket Pipelines have several limitations, such as only supporting IPv4, having a set number of build minutes each month depending on the BitBucket plan, and not running any pipelines for pushes that involve more than five tags, bookmarks, or branches. Furthermore, building Docker images in BitBucket Pipelines has significant limitations, including a lack of multi-platform and buildx support, caching limitations, and multiple disabled Docker features.
While Bitbucket offers a solid foundation for version control and code hosting, these drawbacks are important to consider when choosing a platform. If your team is already heavily invested in the Atlassian ecosystem with products like Jira, Bitbucket might still be a good fit. However, for teams prioritizing extensive integrations, a modern interface, robust search, or advanced issue tracking, exploring alternative platforms like Github or Gitlab might be more fruitful.
Why Developers Choose Bitbucket?
While GitHub is the most popular code hosting platform, BitBucket has its own ground with a dedicated user base. Here’s why developers choose BitBucke:
Atlassian Integration: BitBucket integrates with Atlassian products, especially Jira, the popular project management and issue-tracking tool. This creates a seamless workflow for development teams. Suppose a bug is identified in Jira, you click a button, and you’re right in BitBucket looking at the relevant code. This tight integration streamlines communication and development processes for large teams.
Free Private Repositories: Unlike GitHub, which offers free public repositories but charges for private ones, BitBucket provides unlimited free private repositories for small teams (under 5 users). This is a game-changer for startups and companies who don’t want their source code publicly accessible.
Security Features: BitBucket offers robust security features like IP allowlisting. This means you can restrict access to your codebase by allowing connections from specific IP addresses. Additionally, BitBucket is compliant with various industry-standard security protocols like SOC 2 and PCI DSS. This gives companies peace of mind knowing their code is well-protected.
Version Control System Support: BitBucket goes beyond Git, the dominant version control system used by GitHub. It supports various version control systems like Subversion and Mercurial. This caters to developers who might be comfortable using these older systems or have existing projects in them.
Easy Code Import: Migrating code from other platforms can be a hassle. BitBucket simplifies this process by allowing easier import of code repositories from various platforms. This can save developers significant time and effort when switching to BitBucket.
Code-Review Features: BitBucket provides a super-fast code review system. It has a unique commit-level review system that makes it easy for developers to check the updated code. Features like task management and contextual commenting allow them to easily manage changes to the codebase.
BitBucket Pricing
BitBucket caters to different team sizes and needs with its tiered pricing structure. Here’s a breakdown of both cloud-hosted (BitBucket Cloud) and self-hosted (BitBucket Data Center) options:
BitBucket Cloud
Free Tier: Perfect for small teams (up to 5 users). Here’s what you get:
- Unlimited Private Repositories: Host all your code projects privately within BitBucket.
- 50 Build Minutes Per Month: Build minutes are the time your team spends building and testing code in Bitbucket Pipelines. If you exceed this limit, you can purchase additional minutes.
- 1 GB of Git Large File Storage (LFS): Git LFS is a Git extension that improves the handling of large files by lazily downloading the needed versions during checkout, rather than during clone/fetch.
- Three integrations for code insights: Code insights are reports, annotations, and metrics that help you analyze your code in Bitbucket.
Ideal For: Small teams with basic version control needs, open-source projects, or individual developers.
Standard Tier ($3 user/month, billed annually): This plan builds upon the free tier with:
- Everything in the free tier.
- Scalable Storage and Build Minutes: As your project grows, you can purchase additional storage (increments of 100 GB) and build minutes (increments of 1000 minutes) to meet your needs.
- 2,500 build minutes per month and 5 GB of Git LFS.
- You can add as many users as you need.
- Three integrations for code insights.
Ideal For: Growing teams requiring more storage and build capacity for CI/CD pipelines.
Premium Tier ($6 user/month, billed annually + $49 base fee): This plan offers advanced features for larger teams and enhanced security:
- Everything in the standard tier.
- Enforced Merge Checks: Ensure code quality by mandating specific checks before code is merged into the main project.
- IP Allowlisting: Restrict access to your repositories based on IP addresses for added security.
- Deployment Permissions: Control who can deploy code to production environments.
- Required Two-Step Verification: Add an extra layer of security for user logins.
- Priority Support: Get faster assistance from BitBucket’s support team.
- 3,500 build minutes per month and 10 GB of Git LFS.
- Unlimited integrations for code insights.
Ideal For: Large teams, enterprises, or organizations requiring strict security controls and dedicated support.
BitBucket Data Center (Self-Hosted)
- This option is deployed on your own servers, offering more control and customization.
- Pricing starts at $2300 per year and scales based on usage.
Ideal For: Large organizations or those with specific security or compliance needs who prefer an on-premises solution.
How to Choose the Right Plan?
When you’re choosing a Bitbucket plan, you need to consider the size of your team. The Free Plan is great for small teams of up to 5 users. But if your team is larger, you might want to look at the Standard or Premium plans.
Next, think about how much time your team spends building and testing code. If you’re going to need more than 50 build minutes per month, the Free Plan won’t be enough. In that case, the Standard or Premium plans, which offer more build minutes, would be more suitable.
The type of files your team works with is another factor. If your team often works with large files, you’ll need a plan that offers more Git Large File Storage (LFS). The Standard and Premium plans offer more LFS than the Free Plan.
Code insights are another consideration. These are reports, annotations, and metrics that help you analyze your code in Bitbucket. If you need more than three integrations for code insights, you’ll need the Premium plan.
If your organization requires advanced security and compliance features, the Premium plan is the way to go. It offers features like IP allowlisting, enforced merge checks, and required two-step verification.
Finally, if you want to host Bitbucket on your own infrastructure, you should consider the Data Center plan. This plan is designed for organizations that want high availability, performance at scale, and advanced security features.
You can always start with a lower-tier plan and upgrade as your needs grow. And don’t forget to check the official Bitbucket website for the most up-to-date information before making a decision. It’s also a good idea to consult with your team before deciding on a plan.
How to Create a Repository in BitBucket?
If you still need to get a Bitbucket account, you’ll need to create one. You can sign up with your Google account or an email and password.
Log in to Bitbucket and navigate to the main dashboard. There, you should see a “Create” button or a “+” symbol (usually located in the top navigation menu). Click on it and select “Repository” from the dropdown menu.
A new page will open with a form for creating your repository. Here’s what you’ll need to provide:
Repository name: Choose a descriptive name for your repository, keeping in mind it should be under 62 characters and cannot include special characters (they’ll be converted to dashes).
Access level: By default, the repository will be private (only you and those you grant access can see it). You can make it public if you want anyone to be able to view it.
Include a README?: A README file provides information about your project. You can choose to include a default README template or skip it for now (you can add one later).
Version control system: Unless you have a specific reason to use another system, leave the default option (Git) selected.
Once you’ve filled in the details, click the “Create repository” button. Bitbucket will create your repository and take you to its main page (Source).
Take some time to explore the repository you’ve just created. Remember that initially, the repository will be empty without any code. You’ll start adding files to it soon.
How to Setup BitBucket Pipelines?
BitBucket pipelines automate your software development workflow by letting you define and run a series of steps (called a pipeline) whenever there are changes to your code. Here’s how to setup:
Locate your desired repository in BitBucket. Within the repository navigate to the Settings tab. Look for the Pipelines section within settings. It will usually have a toggle switch. Enable the toggle to activate BitBucket Pipelines for your repository.
Creating the Pipeline Configuration (bitbucket-pipelines.yml):
There are two main ways to create the configuration file:
Using the BitBucket Pipelines UI (Beginner-Friendly)
In the pipelines section of your repository settings, you will see a button labeled Create your first pipeline or similar wording. Click on this button. Bitbucket offers various pipeline templates that cater to different project types. Choose a template that aligns with your project’s needs (e.g., “Recommended” for a general starting point).
Once you choose a template, you can customize the steps defined within it to match your specific build, test, and deployment processes.
Writing the YAML File Directly (For More Control):
Create a new file named bitbucket-pipelines.yml in the root directory of your repository. This file serves as the blueprint for your pipeline and uses YAML syntax for defining the stages and steps involved.
The Bitbucket documentation offers comprehensive details and examples on how to configure bitbucket-pipelines.yml effectively https://support.atlassian.com/bitbucket-cloud/docs/bitbucket-pipelines-configuration-reference/.
Define Stages in Your Pipeline:
The bitbucket-pipelines.yml file allows you to structure your pipeline into distinct stages. These stages typically represent different phases of your development workflow, such as:
- Building: This stage might involve installing dependencies, compiling code, and generating artifacts.
- Testing: This stage could include running unit tests, integration tests, and code coverage checks.
- Deployment: This stage might handle deploying your code to a staging or production environment.
Within each stage, you can specify the commands or scripts that need to be executed.
Leveraging BitBucket Pipes (Optional):
Bitbucket provides pre-built pipeline components called Bitbucket Pipes that streamline common development tasks within your pipelines. Here are some examples:
- Running Unit Tests: A pipe specifically designed to execute your unit test suite.
- Security Scanning: A pipe that can integrate a security scanning tool into your pipeline to identify potential vulnerabilities.
These pipes can significantly reduce the code you must write in your bitbucket-pipelines.yml file, making your pipelines more concise and maintainable. You can explore the available Bitbucket Pipes and how to use them in the official documentation.
BitBucket Tools
BitBucket is a Git-based code hosting and collaboration tool, built for teams. It offers numerous features to enhance team productivity and code quality:
Best-in-Class Jira Integration: BitBucket has a built-in Jira UI that allows you to manage your Jira issues directly from BitBucket. This means you can track the progress of your issues without having to switch between different platforms. When you include your issue key in your commits, your Jira issue statuses update automatically. This helps keep everyone on the team updated about various tasks and issues.
Code Review Features: BitBucket offers comprehensive code review features that help you find and fix bugs before you deploy. You can review large diffs with ease, view third-party code reports, and open Jira tickets right from the PR screen. This makes the code review process more efficient and ensures that any issues are addressed before the code is deployed.
Automated Deployments: BitBucket includes a built-in CI/CD tool called BitBucket Pipelines. This tool allows you to create powerful, automated workflows that can help you streamline your development process. You can also connect BitBucket Cloud to on-premise CI/CD tools like Bamboo or Jenkins if you prefer to use those tools.
Security: BitBucket takes security seriously. It offers automatic security scans with out-of-the-box integration with Snyk, a popular security tool. BitBucket Cloud is compliant with several important standards, including SOC2/3, ISO, and GDPR. It also offers two-factor authentication (2FA) and IP allowlisting to ensure that your code is only accessible by authorized users.
Integration with IT Operations: BitBucket can be integrated with Jira Service Management to enable automated change approval processes and resolve incidents faster. By mapping incidents to deployments, you can quickly identify and address any issues that arise during the deployment process.
Third-Party Integrations: BitBucket supports integration with dozens of third-party tools. This allows you to extend the functionality of BitBucket and tailor it to your team’s specific needs. You can explore more apps and add-ons for BitBucket in the Atlassian Marketplace.
Bitbucket offers different hosting options: Bitbucket Cloud, Bitbucket Server, and Bitbucket Data Center, each with its own set of features. Depending on your team’s needs, one of these options may be more suitable for you. For example, Bitbucket Server and Data Center are self-hosted options that give you more control over your data and infrastructure. At the same time, Bitbucket Cloud is a hosted service that takes care of the infrastructure for you.
History
Bitbucket, a Git-based source code repository hosting service, was founded by Jesper Nøhr in 2008. It started as an independent startup and was later acquired by Atlassian on 29 September 2010. Bitbucket offers both commercial plans and free accounts, and it allows an unlimited number of private repositories.
In 2015, Atlassian renamed their Stash product to Bitbucket Server. This product, written in Java and built with Apache Maven, is a combination of a Git server and a web interface. It enables users to perform basic Git operations while controlling read and write access to the code, and it integrates with other Atlassian tools.
Bitbucket added support for Git Large File Storage (LFS) in July 2016. The platform is primarily used for code and code review. It offers a range of features including pull requests with code review and comments, Bitbucket Pipelines (a continuous delivery service), two-step verification, IP whitelisting, merge checks, code search, Git Large File Storage (LFS), documentation, issue tracking, wikis, static sites hosted on Bitbucket Cloud, add-ons and integrations, REST APIs to build third-party applications, snippets that allow developers to share code segments or files, and smart mirroring. These features collectively enhance the user experience and make Bitbucket a comprehensive tool for code management.
Infrastructure
BitBucket, a Git repository management tool, offers deployment options with different architectures:
Bitbucket Cloud:
Atlassian manages the entire infrastructure, including servers, storage, networking, and security. This frees you from managing hardware, software updates, and disaster recovery. Bitbucket Cloud is built on a scalable infrastructure that can automatically adjust resources based on user demand. You don’t need to worry about adding servers or scaling storage as your team grows.
Atlassian takes care of security, including access control, data encryption, and regular security audits. You can leverage their expertise to ensure your code is secure.
BitBucket Server:
Application Nodes: Multiple identical application nodes run the Bitbucket software. This provides redundancy – if one node fails, another can take over, minimizing downtime. You can scale horizontally by adding more nodes to handle increased user load.
Load Balancer: This acts as a traffic director, distributing incoming user requests and API calls evenly across the application nodes. This ensures optimal performance and prevents any single node from becoming overloaded.
Shared File System: This central storage system holds your Git repositories, attachments, avatars, and other shared data. All application nodes can access and modify files in this shared location. Popular options include distributed file systems like HDFS or network-attached storage (NAS).
Database: A central database stores all critical Bitbucket data, such as users, groups, permissions, repository metadata, and code review information. This allows all application nodes to access and update the same information consistently. Popular choices include PostgreSQL or Oracle.
Administrative Overhead: You are responsible for installing, configuring, managing, and securing the Bitbucket server infrastructure. This includes tasks like software updates, user management, backups, and disaster recovery planning.
How to Create a Duplicate Repository in BitBucket?
To duplicate a Bitbucket repository, you can use either the UI importer or the CLI. If you prefer the UI importer, first log in to Bitbucket and navigate to the workspace where you want to duplicate the repository. Click on Create > Repository and then choose Import repository in the top right corner of the form. You can also access this directly using the URL https://bitbucket.org/<WorkspaceID>/workspace/repository/import (replace <WorkspaceID> with your destination workspace name). Fill in the import form with the repository URL you intend to duplicate, your Bitbucket username, your App Password, the workspace destination for duplicating the repository, the project, and the name of the duplicated repository. Once all information is filled in, click the Import Repository button to duplicate the repository.
If you prefer the CLI, first clone the bare repository you want to duplicate locally using the command git clone –mirror https://<username>@bitbucket.org/<WorkspaceID>/<RepoName>.git for HTTPS or git clone –mirror git@bitbucket.org:<WorkspaceID>/<RepoName>.git for SSH. Then, create the duplicate repository placeholder in your destination workspace and save the URL. Navigate to the cloned bare repository on your local machine via CLI. Perform a mirror push to the new repository in the destination workspace using the command git push –mirror https://<username>@bitbucket.org/<WorkspaceID>/<RepoName>.git for HTTPS or git push –mirror git@bitbucket.org:<WorkspaceID>/<RepoName>.git for SSH. Remember to replace <username>, <WorkspaceID>, and <RepoName> with your Bitbucket username, workspace ID, and repository name respectively.
How to Add SSH Key to BitBucket?
A key that unlocks your BitBucket account on your computer is called an SSH Key. It provides a secure way to connect your repositories without constantly typing your password. Let’s walk through generating this key and adding it to BitBucket:
- Open your terminal application, which is like a command prompt for your computer.
- We will use a command called ssh-keygen to create the key. Type the following command and press Enter:
ssh-keygen -t rsa -b 4096 -C “your_email@example.com”
- -t rsa: This specifies the type of key to create. RSA is a common and secure option.
- -b 4096: This sets the key strength. A higher number like 4096 provides better security.
- -C “your_email@example.com”: This adds your email address to the key for identification. Replace “your_email@example.com” with your actual email address.
- You might be prompted to enter a passphrase. This is an optional password that adds an extra layer of security to your key. Think of it like a PIN for your key. If you choose to set a passphrase, enter it twice when prompted. Remember this passphrase if you choose to use one.
Adding the Public Key to BitBucket
- Now that you have the key, it’s time to add it to BitBucket. Log in to your BitBucket account and navigate to your settings.
- Look for a section related to security or SSH keys. This might be under “Personal Settings” and then “Security”.
- Within the SSH keys section, you will find an option to “Add key”. Click on that button.
- Here’s where your key comes in. You need to add the public part of the key to BitBucket. The public key is like a handshake that identifies you, while the private key (on your computer) is like the actual key that unlocks the door.
- To find the public key, locate a file called id_rsa.pub. On Unix-based systems, it’s typically in the ~/.ssh/ directory (the tilde represents your home directory). On Windows, it might be in C:\Users\<username>\.ssh\id_rsa.pub.
- Open this id_rsa.pub file with a text editor. You will see a long string of text. This is your public key.
- Copy the entire text from the id_rsa.pub file.
- Go back to BitBucket’s “Add key” section and paste the copied public key text into the designated field.
- Give your key a descriptive label, such as “Work Laptop” or “Home Computer”, to help you identify it later.
- Click “Add key” to finalize adding the key to your BitBucket account.
Testing the Connection
You can optionally test if the SSH key is working correctly. In your terminal, type the following command and press Enter:
ssh -T git@bitbucket.org
If the key is added successfully, you should see a message like “Hi <username>!”. This confirms that your computer can connect to BitBucket using the SSH key.
By following these steps, you’ve created an SSH key and added it to BitBucket. Now, whenever you interact with your BitBucket repositories using Git commands in your terminal, you won’t need to enter your password each time. The SSH key provides a secure and convenient way to manage your code.
How to Create an Empty Repository in BitBucket?
Begin by logging in to your BitBucket account. Navigate to the BitBucket website and use your credentials to sign in. Once logged in, locate the option to create a new repository. This might be a button labeled “Create” or “New repository”. It’s often situated at the top of the page or within a sidebar menu. Clicking this button will initiate the repository creation process.
BitBucket will present you with a form to configure your new repository’s details. Here’s what you’ll need to provide:
Repository Name: This is the crucial step as the name you choose will become part of your repository’s URL. Select a name that clearly describes the purpose of your repository for better organization and identification.
Description (Optional): You can optionally add a brief description of your repository. This description can provide further context about the project or code stored within the repository.
By default, the options for creating a new repository typically won’t include any initial files in the repository. There might be an option to include a README file, a file that typically contains information about your project. To ensure an empty repository, leave this option unchecked.
After you’ve filled in the details and confirmed that you want an empty repository (no initial files), proceed by clicking the button to create the new repository based on your specifications.