Skip to content

Instantly share code, notes, and snippets.

@raihan71
Forked from huenisys/readme.md
Created August 7, 2019 06:05
Show Gist options
  • Save raihan71/100690d5e2c03d70aa7c6b72db29a781 to your computer and use it in GitHub Desktop.
Save raihan71/100690d5e2c03d70aa7c6b72db29a781 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 !

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