I'm trying to follow the guide to manage multiple repository ssh keys . I've added my ssh as a secure variable, encoded in base64. But how do I decode it to pass it into the pipe's variables (parameters)?
script: - pipe: atlassian/sftp-deploy:0.4.1 variables: SSH_KEY: $MY_SSH_KEY_B64 //<- How do I decode it before passing it?? ...
Thanks for your answer @Oleksandr Kyrdan . Sorry, I didn't fully get you... should I pass it encoded or decoded? I tried saving it encoded as the tutorial states but then I'm getting "invalid format" error:
Load key "/root/.ssh/pipelines_id": invalid format
✖ Deployment failed.
Maybe there's something wrong with the key format but I've been using it without problem from my terminal. You know, my key file looks something like this:
-----BEGIN RSA PRIVATE KEY----- // line break here
MIIEpAIBAAKCAQEA1fgwkzccOpKpb4Ln6wIaCVFWgnRX+vANU/s5E3K8boCYQ8FU // line break here
XVrfupIjyPudSgs1RJvMp13PPkLfq+O92bWHQaAkm0b4+xKts8BHsGt8S7FgQjTe // line break here
Z57q0odcy76rGBq2iiqH2YU9P4sDdqLj/r1ZRl+FURwhHk9ATaFx+w== // line break here
-----END RSA PRIVATE KEY----- // line break here
// There's a last line break here
So I encoded it with
base64 -w 0 < my_ssh_key:
And then the I get the "invalid format" error when running the pipline. Any thoughts?
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events