Hi folks,
my pipeline step is failing while executing below command
mvn -B -s .etc/ci/settings.xml release:clean
release:prepare -DconnectionUrl=scm:git:$BITBUCKET_GIT_HTTP_ORIGIN
-DautoVersionSubmodules=true -DscmCommentPrefix="[skip ci]"
-Darguments=-DskipTests
with the error
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] Warning:********@bitbucket.org: Permission denied (publickey).
I am not sure which/whom public key is referring to
Hello @mafuj_jia and welcome to Atlassian Community!
I see you have opened an internal ticket reporting this issue, so I'm just sharing the resolution here in case someone from the community comes across the same error.
When pushing back to a repository from within a pipeline build, the ssh key used will by default be the one defined in Repository Settings > SSH Keys (under Pipelines section).
On that page, you can either use your own existing key or get Bitbucket to generate the keys for you. Once the keys are setup, you will need to copy the public key and add it as an Access key in the Workspace (Workspace Settings > SSH Keys) that contains the repo you are pushing to.
It's important to note that only Workspace access key provides read and write access. Project-level access keys and repository-level access keys only provide read access - more details on Difference between repository, project an workspace access keys .
Thank you, @mafuj_jia !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.