Is there a way that I get the SSH public key that I set up for the repository? I've tried looking into the .ssh directory and I can't find id_rsa.pub. I also looked into .ssh/config and I can see that the identity file is in /opt/atlassian/pipelines/agent/ssh, but I can't find any public key in there either.
Hi @Mike Pham and welcome to the community!
I don't think that the public SSH key is available, but you can create the file in the script of the step where you want to use it, and then access it.
If you add the following command in your script
ssh-keygen -y -f /opt/atlassian/pipelines/agent/ssh/id_rsa > /tmp/id_rsa.pub
it will create the public SSH key from the repo's private SSH key and store it in /tmp directory (because it is not possible to write in the directory /opt/atlassian/pipelines/agent/ssh/).
Another way would be to copy the public key from the repo's Settings and use that command instead in the script:
echo "paste_public_key_here" >> /tmp/id_rsa.pub
That command would need to get updated though if you decide to change the SSH keys in the repository.
Please feel free to let me know if that works for you and if you have any questions.
Managing services end-to-end, optimizing efforts to deliver the best services to customers. This is what team leaders and managers want to achieve. When using a tool like Jira, it...
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