Skip to content

Instantly share code, notes, and snippets.

@huenisys
Last active May 2, 2020 20:57
Show Gist options
  • Save huenisys/1be51b12eae7f65b3b454d3a51fa30cb to your computer and use it in GitHub Desktop.
Save huenisys/1be51b12eae7f65b3b454d3a51fa30cb to your computer and use it in GitHub Desktop.
encode private RSA key for gitlab error: "Enter passphrase for /dev/fd/63" error

Encode your private RSA key

$ cat my_private_key | base64 -w0 
# -w0 to avoid newlines

Add the base64 string to your project variables. Use it in your .gitlab-ci.yml

ssh-add <(echo "$SSH_PRIVATE_KEY" | base64 -d) No headache !

@abdulkarim-itani
Copy link

cat private | base64 -w0
base64: unknown option -- w

What should I do?

@maliksjsu
Copy link

base64: unknown option -- w

try -b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment