How to Export a Multi-line Environment Variable in Bash/Terminal e.g: RSA Private Key

后端 未结 6 1786
半阙折子戏
半阙折子戏 2020-12-13 09:01

One of our Apps github-backup requires the use of an RSA Private Key as an Environment Variable.

Simply attempting to export the key it in the terminal e.g: te

6条回答
  •  醉话见心
    2020-12-13 09:33

    If you want to export direct value (not from *.pem) then use " after equals sign. The terminal will let you finish with another ".

    export PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
    MIIEpAIBAAKCAQEA04up8hoqzS1+
    ...
    l48DlnUtMdMrWvBlRFPzU+hU9wDhb3F0CATQdvYo2mhzyUs8B1ZSQz2Vy==
    -----END RSA PRIVATE KEY-----"
    

提交回复
热议问题