The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Added SSH key but still ask for password

mkhan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 7, 2019

Hey,

 

I have added the ssh successfully as per the instructions and got this message 

ssh -T myusernane@bitbucket.org
logged in as myusername.

You can use git or hg to connect to Bitbucket. Shell access is disabled.




But when I use the git pull command, still asks me for a password.
How to solve this problem?


1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

3 votes
Mikael Sandberg
Community Champion
May 7, 2019

Hi Moby,

Welcome to the Atlassian Community.

Did you also change the remote URL for your repository to use SSH instead of HTTP/HTTPS?

You can use the command git remote set-url to change it.

mkhan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2019

Thanks for answer  but I'm not sure which url to set? 

Mikael Sandberg
Community Champion
May 9, 2019

You can check the URL used for your repository by running git remote -v, this will list the remote URLs:

$ git remote -v
Bitbucket.org https://username@bitbucket.org/username/repository.git (fetch)
Bitbucket.org https://username@bitbucket.org/username/repository.git (push)

If the URL looks like in the above example then you are not using SSH. Also note that if you have a passphrase for your SSH Key, you will be asked to enter that every time.

Like # people like this
Daniel Ceillan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 21, 2021

great! this really helped! <3

waruna-nsh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 12, 2022

For someone who is still looking for a solution, this is how you set the remote URL with ssh

git remote set-url origin git@bitbucket.org:<repo_name>/<repo_name>.git
Like # people like this
TAGS
AUG Leaders

Atlassian Community Events