Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Windows 8.1 machine can't connect bitbucket git repository with ssh

Jordi Bakker January 18, 2018

Hello Bitbucket,

 

A colleague of my have problems with clone a git repository from the Bitbucket git repository (cloud). On https it works but when he uses ssh then he get the notice that he don't have access and that has to do with the ssh key.

Example command:
git clone -b development git@bitbucket.org:xxx/xxxx.git .
===
error:
Could not read from remote repository.

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

====

I already generate ssh keys and add them to bitbucket but still it doesn't work.

used putty-gen

example of an url which I followed: https://confluence.atlassian.com/bbkb/invalid-ssh-key-610763481.html

I need help

1st question which tool to you advice to enable ssh on windows 8.1 (64 bit) so I can use command line (terminal)

2nd question which tool to you advice to enable git on windows 8.1 (64 bit) so I can use command line (terminal)

3rd question When you use putty-gen you get an ppk private key and the generated public key can't copied / paste to bitbucket ssh keys you must change it because of the comment lines and rsa-... are missing. How can we generate a correct public key with putty-gen.

4th question where I can define in windows which ssh keys they can use standard?

5th question which parameter do I can use to define the correct ssh private key and can I use the ppk key?

example git clone:
git clone -b development git@bitbucket.org:xxx/xxxx.git .

 

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 19, 2018

Hi Jordi! I'll address your question one by one:

1. (1st and 2nd questions are the same) If you want to create your SSH key using the command line, you can follow the instructions at Creating SSH keys.

3. Are you following the same steps as in the article you linked above? With some tools some extra text is added to the key, but there is nothing really we can do about that.

4. First, you can run this command to see which key is your SSH agent currently offering:

ssh-add -L

If you don't see your key listed, you can add it by:

ssh-add ~/.ssh/identity

Note that with ssh-agent management Bitbucket uses the first key on the list. If you are still having problems, try removing all but the identity you want to connect with.

ssh-add -d ~/.ssh/identity

 

5. This question seems very similar to the previous one. You can check if your SSH agent is offering the right key by doing

ssh -Tv git@bitbucket.org

it will return the username that is trying to authenticate. If it's the wrong one, follow the steps in #4.

If you're still having trouble, please attach the output of:

git -Tv git@bitbucket.org

 

For more info regarding SSH issues, you can read Troubleshooting SSH issues

Let us know if you have more questions!

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events