Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Problem with private repo clone from Bitbucket Pipeline

Herman_Lintvelt April 18, 2018

Hi, we have a bitbucket repo (let's call it repo-1) that needs to clone another private repo (repo-2). Actually it needs to do this via a pip install, but we have also tested via normal `git clone`. 

We have tried both the `Pipeline | SSH Keys` setting (on repo-1) and then giving that public key access via the `User Access Keys` setting on repo-2, as well as doing our own key and making that available as environment var to the bitbucket pipeline in repo-1.

In the case of trying a simple git clone, both these fail:

+ git clone git@bitbucket.org:our-org/private-repo-2.git

Cloning into 'custos-video-client'...

ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory

Host key verification failed.

fatal: Could not read from remote repository.

 

It also looks like a password is expected for the private key, but afaik when using keys generated under `Pipeline | SSH Keys` setting, no passwords are involved?

Is there anything else we can look at, or perhaps some issues/constraints with accessing private bitbucket repos from a pipeline that we should be aware of?

 

1 answer

1 vote
davina
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2018

Hi Herman,

I am able to successfully clone a private repository (repo-current) into another private repository (repo-to-clone)

Steps I took:

  • Go to repo-current Settings -> Pipelines -> SSH Keys and Generate keys.
  • Copy public key to my Bitbucket account -> Settings -> SSH keys.
  • Add git clone repo-to-clone command to my bitbucket-pipelines.yml
  • Run pipeline - the image I used was atlassian/default-image:latest

The error you're seeing

ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory

looks environment specific. It could be related to the image you're using.

If issues persist, I would recommend debugging this locally as described here.

Hope this helps as a starting point!

Herman_Lintvelt April 19, 2018

 

Thanks, I was starting to think the same. We did base our docker image on the default atlassian one, but then also customized it, could be that something was done wrong there. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events