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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Problem with private repo clone from Bitbucket Pipeline

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

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!

 

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
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,897 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you