Bitbucket User Being Asked for Password Each Time They Git Pull/Push

April 27, 2015 9k views
DigitalOcean Git Security Ubuntu

Hello DO,

We are just getting acclimated to our new Bitbucket/DO workflow and we ran into an issue that we don't know if we resolved in the best manner possible. I would like to run that scenario by you guys to see if anyone has a better recommendation for our workflow.


We created a Repo inside of our Team account
We then added a non-team member (remote developer) to the repo as an Admin


We then created the new user for the remote developer on the Droplet with the following permissions: newuser ALL=(ALL:ALL) ALL

We wanted the developer to be able to easily push and pull his changes to the live server but we ran into a continuous problem with him pulling the changes from Bitbucket. We eventually came to the solution of running the git pull command like so:

sudo git pull

(it was previously asking him to enter our main team member's Bitbucket password)

The Problem:

The developer was expressing to us that it was quite aggravating to work like this as it was asking him for his username and password each time he went to push or pull his changes from Bitbucket.

The Question:

I'm assuming there is a solution to this problem by using SSH Keys but I'm a bit fuzzy as to how to utilize the SSH Key in this scenario. Will he just need update his Bitbucket account with his SSH Key or is this something that needs to be done on DO? Maybe both?

Sorry for the long winded explanation but I thought maybe there was a better way to accomplish this from the get-go. Any tips or how-to articles are very much welcomed.

Thanks! - Daniel

1 Answer

You will need to add his ssh key to bitbucket so they can use the service without logging in every time. There is a tutorial here:

Have another answer? Share your knowledge.