Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect Nitrous.io to Bitbucket Git SSH Public Key

I can't connect my Bitbucket git repos to Nitrous.io. Here is the error I get:

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

At first I thought you had to have your computer's public key in Nitrous and Bitbucket to connect them, but that doesn't work. What am I missing?

like image 779
Ryan Avatar asked Jan 10 '14 19:01

Ryan


People also ask

How to Add public key to Bitbucket repository?

Add the public key to your repository From Bitbucket, go to the repository and click Repository settings. Click Access keys from the left menu. Press Add key. From the Add SSH key dialog, enter a Label and paste the public key from the clipboard.


1 Answers

All you have to do is:

Go to your nitrous box (IDE or Terminal), and run this:

cat ~/.ssh/id_rsa.pub

which will display the Nitrous SSH public key (not your computer's public key, but the one for that box).

Go to Bitbucket > My Account > SSH Keys and paste the Nitrous key in. Be sure to name it Nitrous or something like that so you know what key it is later. Then your repos will connect just fine.

like image 98
Ryan Avatar answered Sep 30 '22 16:09

Ryan