Bamboo plan spec ssh key configration

Ibrahim Buamod July 23, 2023

I having an issue in configuration the ssh keys
as this post but the solution didn't work with me 
https://community.atlassian.com/t5/Bamboo-questions/Bamboo-YAML-spec-not-working-when-I-use-with-plan-repo/qaq-p/2004010

java.lang.IllegalArgumentException: Cannot read keypair, passphrase wasn't set
java.lang.RuntimeException: java.lang.IllegalArgumentException: Cannot read keypair, passphrase wasn't set

Caused by: java.lang.IllegalArgumentException: The supplied key is not in a supported format or needs a passphrase to be decrypted


my workflow:

I clone a yaml file and modify it to work for another project, I didn't find a proper way on how to handle the ssh keys 

- repo-name:
type: bitbucket-server
server: Stash
project: project
slug: repo-name
clone-url: ssh://git@stash.company.local:7999/project/repo-name.git
public-key: ssh rsa generated key (imported to the project ssh key )
private-key: encrypted private key

I read that the passphrase is only for git repos

2 answers

1 vote
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2023

Hello @Ibrahim Buamod

The SSH public key portion of your key needs to be added to your repository settings on your Bitbucket server, while the SSH private key needs to be encrypted before being added to the YAML specs file.

To encrypt a string, run it through Bamboo's Specs Encryption tool.

The SSH private key can't be password protected.

Thank you,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

0 votes
Ibrahim Buamod July 23, 2023

.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events