writeSSHKey $secretName $privateName

Write SSH credentials correctly based on a fixed secret format.

secrets.json example:

  "default-ssh": {
    "kind": "Secret",
    "data": {
         "-----BEGIN OPENSSH PRIVATE KEY-----\n.....\n-----END OPENSSH PRIVATE KEY-----\n",
         "ssh-rsa ..... default-ssh@hercules-ci\n"



Optional. Default: ssh

The name of the secret to read. Must match the attribute name of a secretsMap entry.


Optional. Default: ~/.ssh/id_rsa

Where to write the private key. A public key will be derived and written to ${privateName}.pub