Forums

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

How to clone a bitbucket repo in pipeline

Hao Zhang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 5, 2019

I have a script running in a pipeline in a repository A and when it finished it clones another bitbucket private repo B and commits to it. I have access to both repos.

git clone --depth 1 git@bitbucket.org:organization/reponame.git

Now the git clone get a "Permission denied(public key)" error every time.

I guess I should add the SSH key of A to repo B. But I don't know how.

I tried with

1. Access key. Didn't work since it is a read-only permission.

2. Use key-gen. Didn't work since all my repos are on bitbucket cloud.

3. Use personal key. It's not recommended and the script used to be working.

4. Add user. I don't know what user should be added. Can I add bitbucket-pipeline as a user?

That's all I can think of.

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Hao Zhang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 5, 2019

It's been solved. I added SSH keys to my profile.

Qaiser_Naeem
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 15, 2020

Hi Hao? 

Would you please describe your solution in more details. As I am struggling with same issue. 

Kind Regards, 

Like Kyle Li likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events