Hi Atlassian Community,
I’m running into a "Permission Denied" error with Bitbucket Pipelines when it tries to pull code from one of my private repositories. The pipeline was working fine until recently, and I haven’t changed any of the repository permissions or SSH keys, so I’m not sure what’s causing the failure.
Here’s what I’ve tried so far:
Is there something in the pipeline settings that I might be missing, or has anyone else experienced issues with permission changes affecting pipelines? Any help would be much appreciated!
Thanks in advance for any insights!
Hi Ben,
Could you please let me know the following, so I can better help you?
1. Are you running this Pipelines step on Atlassian's infrastructure or with one of our self-hosted runners?
2. If you are using a runner, is it a Linux Docker, Linux Shell, MacOS or Windows runner?
What is the version of the runner?
3. In the repository where you run this Pipelines step, I assume you have generated the SSH key pair from Repository settings > section Pipelines - SSH keys?
If so, can you confirm if the public SSH key from that page matches one of the Access keys of the repo you are cloning?
4. Can you adjust your bitbucket-pipelines.yml file and add GIT_SSH_COMMAND="ssh -vvv" to the command that clones the repo?
Like this:
- GIT_SSH_COMMAND="ssh -vvv" git clone git@bitbucket.org:workspace-id/repo-slug.git
where workspace-id and repo-slug should be the values for the repo you are trying to clone.
Then, when another build with this adjusted command runs, please share the output of the command here (please make sure you sanitize any private/sensitive data in the output, before sharing).
This will show us more verbose output, including which SSH key is offered, and it may give us an indication of what is going wrong.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.