The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Git clone with SSH fails on Alpine linux

Ward Loos
January 24, 2019

I'm trying to clone a second repository with deployment config in my pipeline:

script: 
-
git clone git@bitbucket.org:<team>/<repo>.git /<repo>

I followed the steps listed here: https://confluence.atlassian.com/bitbucket/use-ssh-keys-in-bitbucket-pipelines-847452940.html

This works fine when I use a Debian based image (google/cloud-sdk). 

However, when I use an Alpine based image this fails. This is a private image based on devth/helm, I added ssh with:

RUN apk add --no-cache openssh-client

Error:

+ git clone git@bitbucket.org:<team>/<repo>.git /<repo>
Cloning into '/<repo>'...
Host key verification failed.
fatal: Could not read from remote repository.

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

 Do I need extra steps to get this to work on Alpine?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Ward Loos
January 28, 2019

Found that devth/helm changes HOME which seems to interfere with the ssh config. Changed image to google/cloud-sdk:alpine and it works.

TAGS
AUG Leaders

Atlassian Community Events