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

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 vote

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,747 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you