Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ssh key and password

giorg September 17, 2018

Hello,

I did create a private project, and set up an ubuntu server with a lxd container where is my app. I pasted ssh key of my container on bitbucket project, but when I do git pull it always asks me the password. I thought if I set ssh key I won't be asked for password, am I wrong?

 

thanks a lot

1 answer

1 accepted

0 votes
Answer accepted
Charlie Misonne
Community Champion
September 17, 2018

What is the url of your git remote on your ubuntu server? Please check if it is an ssh:// or http:// url.

You can check it with: git remote -v

 

If it's http it is not using your ssh key and you have to change your remote url.

 

Another possibility is that your ssh key is password protected.

giorg September 17, 2018

Hey Charlie,

thanks for your answer! git remote -v gives:

origin    https://setsrl@bitbucket.org/setdevs/setonline.git (fetch)
origin    https://setsrl@bitbucket.org/setdevs/setonline.git (push)

so I guess it should be ssh:// to work as expect! How do I set that?

thanks a lot!

Charlie Misonne
Community Champion
September 17, 2018

that's right! You can change it easily with:

git remote set-url origin ssh://git@bitbucket.org/setdevs/setonline.git

I'm not 100% sure of that git ssh url in my example but you can check it easily on Bitbucket. Under the clone button you should have two options: ssh and https

giorg September 17, 2018

thank you very much!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events