Connecting Jenkins to Bitbucket server on a Windows 2012 R2 machine using SSH key Edited

Hi,

I am using a Windows 2012 R2 server on which I have installed my Bitbucket server and Jenkins.

I have also installed openSSH and as far as I can tell the ssh service is running ok.

I logon to the server using a certain account (say WinServUsername) and have a different MyUsername to connect to both Bitbucket and Jenkins.

I have created a ssh key under "C:\Users\WinServUsername" and added the host mycomputer.

I have tried to follow advices from https://community.atlassian.com/t5/Continuous-Delivery-questions/Connecting-Bitbucket-and-Jenkins/qaq-p/81239/page/2

but so far I still get permission denied when trying to add the rep to a jenkins job.

In jenkins I have created 3 type of "Username and SSH key" credentials:

1/ MyUsername and SSH key copied manually from "C:\Users\WinServUsername\.ssh\id_rsa.pub"

2/ WinServUsername and SSH key copied manually from "C:\Users\WinServUsername\.ssh\id_rsa.pub"

3/ jenkins and SSH key copied manually from "C:\Users\WinServUsername\.ssh\id_rsa.pub"

Non of these credentials work.

Has someone done it and could help me to figure out what I am doing wrong?

Thank you.

Ben

1 answer

1 accepted

Well I actually wrote three times my mistake above (maybe that is why it finally sunk in):

Credentials in Jenkins must be:

2/ WinServUsername and SSH key copied manually from "C:\Users\WinServUsername\.ssh\id_rsa" from the private key and not the public one

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

26,280 views 26 12
Join discussion

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