clone from another private bitbucket repo

Hello,

when I want to clone from another repository, I get the error message:

(replaces <myrepo>)
git clone git@bitbucket.org:<myrepo>.git<1s
+ git clone git@bitbucket.org:<myrepo>.git
Cloning into 'tcanbus'...
git@bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
On the remote server the keys are set up and cloning works. I also have the keys from the pipeline repository set up at the other repository.
pipelines:

default:

- step:

name: Step 1

runs-on:

- 'self.hosted'

- 'windows'

script:

- git clone git@bitbucket.org:<myrepo>.git

3 comments

Comment

Log in or Sign up to comment
Jayant Gawali
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 23, 2021

Hi @Gabrisch ,

Thanks for raising the issue. We are looking into the problem and would like to get some more information on it. I will appreciate if you can help with following:-

1. How are you trying to clone the repo? in PowerShell window / Command prompt / Git Bash window?

2. Are you being prompted for entering passphrase for the ssh key during git cloning process?

 

Thanks,

Jayant

Gabrisch December 29, 2021

Thanks for your Reply.

I have found the error on my site. I had to add an environment variable for the plink.exe. After that the cloning via PowerShell had worked, but via Pipline not.
I simply forgot to restart the console in which the pipline runner is running, so that the environment variable is taken over.
The small error cost me hours... 

Jayant Gawali
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 29, 2021

Thanks @Gabrisch . Good to know you are not blocked anymore. Good luck and Happy New Year!!

TAGS
AUG Leaders

Atlassian Community Events