I’m trying to copy files over to a remote host using
scp and ssh keys with alpine docker, but I’m having issues reading in my key.
I’m following the guide here: https://docs.gitlab.com/ee/ci/ssh_keys/README.html
ssh-add <(echo "$SSH_PRIVATE_KEY")
won’t work as
sh seems not to understand the syntax and thinks there are too many brackets. Installing
bash and running
bash -c 'ssh-add <(echo "$SSH_PRIVATE_KEY")'
gets passed that issue, but I’m getting
Error loading key "/dev/fd/63": invalid format.
What should be in
$SSH_PRIVATE_KEY? I just copied in my ssh private key into a pipeline variable (without the
-----BEGIN RSA PRIVATE KEY----- and
-----END RSA PRIVATE KEY----- parts)