Why is my build hanging in #codeship pro at a `git pull` step?

220 Views Asked by At

Why is my build hanging in #codeship pro at a git pull step after " Warning: Permanently added the RSA host key for IP address 'xxx.xxx.xxx.xxx' to the list of known hosts."?

I followed instructions in https://documentation.codeship.com/pro/builds-and-configuration/cloning-repos/#the-ssh-key-option and this adds Bitbucket into known hosts list and adds the SSH key into the container/service during build time, but, I am not able to do any git related operation where I need to connect to Bitbucket.

I captured network packets during this operation by running that step in jet run and I see that after sending 3 encrypted packets, Bitbucket stops sending data and the connection times out3 packets referred to above

Did someone get this issue?

1

There are 1 best solutions below

0
On

I found an answer with help of my colleague.

Make sure to add bitbucket to known_hosts. Use this command:

ssh-keyscan -H "bitbucket.org" >> ~/.ssh/known_hosts

The document linked above is incomplete. Make sure that the one-liner of the id_rsa private key is surrounded with quotes. This will make sure that formatting will be correct upon writing to file.