Question

How to pull master branch from bitbucket

  • Posted October 28, 2016
  • Git

I know just enough about git to commit / push, but can’t seem to get it to download to DO so I can actually host my project.

I am trying to download from mt git repository. I use bitbucket. I’ve tried every variation og git pull and git clone using my url from bitbucket git@bitbucket.org:user/project.git.

remote: not found fatal: repository ‘git@bitbucket.org:user/project.git’ not found Permission denied (publickey)

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Make sure everything is setup correctly on Droplet.

Bitbucket offers you to copy whole command and just execute it. Make sure you do it, so you don’t make typo anywhere.

Looking by Permission denied (publickey), you should have id_rsa and id_rsa.pub in Droplets /home/your-user/.ssh. That same publickey must be specified in Bitbucket settings. I think you need to copy manually using scp or rsync. First make sure you even have .ssh directory in your home folder on Droplet. Then exit SSH, and from your local machine use scp/rsync to copy keys:

  1. scp ~/.ssh/id_rsa your-user@droplet-ip:~/.ssh/
  2. scp ~/.ssh/id_rsa.pub your-user@droplet-ip:~/.ssh/

Login again to the Droplet and try to clone again.

You can also use HTTPS link, as it doesn’t require you publickey. You should have on Bitbucket option to change between SSH and HTTPS link.