To securely interact with Atlassian tools and repositories, you need to generate and add SSH keys to your account.
Step 1: Ensure Git is Installed
Before proceeding, make sure Git is installed on your system. You can verify this by running:
git --version
If Git is not installed, you can install it using the following commands based on your operating system
For Ubuntu/Debian:
sudo apt update
sudo apt install git
For macOS (using Homebrew):
brew install git
For Windows:
- Download the Git installer from git-scm.com.
- Run the installer and follow the setup instructions, using the default options unless you have specific preferences.
- After installation, open Git Bash from the start menu and verify the installation by running:
git --version
Step 2: Configure your username and email (If not set)
Ensure your system has your Git username and email configured. Run the following commands in your terminal:
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"
Replace your name and your_email@example.com
with your actual name and email address.
Step 3: Generate an SSH key
Open a terminal and run the following command to generate a new SSH key pair:
ssh-keygen -t rsa
Press enter to accept the default file location, and set a passphrase if desired.
Step 4: View the SSH public key
Once the key is generated, display the public key by running:
cat ~/.ssh/id_rsa.pub
This will output your public key, which typically starts with ssh-rsa and ends with your email address.
Step 5: Add the SSH key to your Atlassian account
- Copy the entire contents of the displayed public key.
- Log in to your Atlassian account.
- Navigate to the SSH Keys section in your account settings.
- Click on the add SSH key and paste the copied key into the provided field.
- Save the key.
To open settings and add your SSH key, click here. 👉
Top comments (0)