Missed Team ’24? Catch up on announcements here.

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

Build failing at git push for pipeline

gdmacmillan August 19, 2019

I used the AWS deploy S3 pipeline as a template. So the ci_scripts are pretty much the same.

My build step is currently failing at a script called git-commit.sh

+ ./ci-scripts/git-commit.sh[master 7dbc791] Update files for new version '0.1.0' [skip ci] 1 file changed, 2 insertions(+), 1 deletion(-)Warning: Permanently added the RSA host key for IP address '18.205.93.2' to the list of known hosts.Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.

 

code for this:

 

git add .
git commit -m "Update files for new version '${tag}' [skip ci]"
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa -F /dev/null" git push origin ${BITBUCKET_BRANCH}

 

I have followed the steps here: https://confluence.atlassian.com/bitbucket/push-back-to-your-repository-962352710.html in the 

SSH Key pair managed by Bitbucket Pipelines

part

2 answers

0 votes
Raul Gomis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 2, 2019

@gdmacmillan , you probably need to configure the SSH keys so that they are stored in the proper location. There are two ways of configuring SSH keys in Pipelines:

The example you are using uses the second option, moving the SSH key from a environement variable to the proper location as shown here: https://bitbucket.org/atlassian/aws-s3-deploy/src/master/ci-scripts/git-setup.sh

I recommend using the first option when possible as it would be easier to configure.

0 votes
Alex Tran
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 1, 2019

I think the ssh key may not be in ~/.ssh/ but could be at /opt/atlassian/pipelines/agent/ssh

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events