Setting up SSH with BitBucket

By Dillon Smart · · · 0 Comments

Setting up your project using a remote repository over SSH can become a painful task for new and even the most seasoned developers. In this article we cover how to set up BitBucket SSH.

Repositories not found, incorrect permissions and issues when using your SSH key can all occur, and become very stressful. Below are some steps that should help you along your way. This starts right at the beginning, so some of these steps may now be relevant for you.

Downloading GIT

The first step is to download GIT, follow this link to do so. To check GIT has been installed successfully, open Terminal and type:

git --version

Download SourceTree (We recommend this)

SourceTree is a brilliant piece of software that helps to make using GIT much easier, and preventing you from diving into the terminal to do the simplest tasks.

Connect SourceTree with BitBucket SSH

Once you have SourceTree installed, the next step is to connect to your BitBucket account, and SourceTree provides BitBucket as an option you can simply select.

Follow the steps displayed on screen. You will also be asked to create a Pass Phrase, be sure use something you will remember, as you will need this later on.

Generating your SSH key

Open Terminal and type the following:

ssh-keygen

You will then be show where the key will be stored, so just hit enter here.

Next you will need to copy the generated key to your clipboard, and to do this write the following into Terminal:

cat ~/.ssh/id_rsa.pub | pbcopy

Now you have your SSH key, its time to paste it into BitBucket, so select your account, head to your profile, then settings. Under security will be a link labeled SSH Keys. Follow this link and hit the Add Key button. Give your key a name, and past your SSH key into the provided textarea.

GIT Clone

Now that’s all set up, open terminal again and CD into the directory your wish your project to be downloaded in to.

Now clone your repository:

git clone //your-repo-url

You will be prompted to enter your Pass Phrase now, so do that.

That’s it! For mor tutorials, check out our Web Development category.

SSH

0 Comment

Was this helpful? Leave a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

How to set up SSH on Raspberry Pi

Updated 16th August 2022

In this post, I am going to show you how to set up SSH on a Raspberry Pi. Step 1: Raspberry Pi config menu First, open a new terminal and execute the command below to open the Raspberry Pi config menu. sudo rasps-config  Select “Interfacing Options” and press ENTER. Then select “SSH” and press ENTER. 

How to Upload and Download files to and from a Linux server over SSH

Updated 16th August 2022

Its common place to need to upload and download files to and from a remote Linux server. To upload and download files from a remote Linux server you can use the scp (secure copy) command. To download a file you can use: To upload a file you can use: scp /path/to/file/your/uploading username@ip-or-server-name:/path/to/location/to/upload/to Note: It is

How to generate an SSH key and add to authorized_keys

Updated 16th August 2022

In this article we explain how to generate a SSH key for your local machine and add your public key to the authorized_keys on a remote server. Generate an SSH key for Windows, MAC and Linux Note: If you are using Windows, we recommend you use a SSH client like PuTTY. For MAC/Linux run: ssh-keygen