Connecting to Bitbucket from Docker Jenkins Fails

131 views
Skip to first unread message

Steadyonabix

unread,
May 31, 2018, 12:01:56 PM5/31/18
to ZAP Jenkins Plugin
Hi

I'm struggling to configure the SCM section of my freestyle job

I have added the ssh key I'm using on our Bitbucket Repo in the global credentials

I can select the credentials in the dropdown ok and I've supplied the ssh clone URL

What I'm getting is an error:

Failed to connect to repository : Command "git ls-remote -h ssh://g...@scm.XXXXXXXXXX/ap/XX.git HEAD" returned status code 128:
stdout:
stderr: ssh: connect to host scm.XXXXXXXXXXX port 22: No route to host
fatal: Could not read from remote repository.

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

Obviously I've redacted the hostname.

I'm the command exits 0 from my laptop but 128 from the Jenkins image...

I'm about to read up on Docker networking to see if I need to configure something to give it access to the outside world. But hope someone recognises this issue and can come up with the answer before I have to!

Cheers

Steadyonabix

unread,
Jun 6, 2018, 9:00:58 AM6/6/18
to ZAP Jenkins Plugin
This was down to my Jenkins Docker image using the same subnet as AWS for some reason
Reply all
Reply to author
Forward
0 new messages