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 rights
and 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
part
@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:
SSH Key pair managed with variables. https://confluence.atlassian.com/bitbucket/push-back-to-your-repository-962352710.html#Pushbacktoyourrepository-SSHKeypairmanagedwithvariables
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.
I think the ssh key may not be in ~/.ssh/ but could be at /opt/atlassian/pipelines/agent/ssh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.