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

后端 未结 6 1772
半阙折子戏
半阙折子戏 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:11

    You can also use a bash heredoc:

    export MY_CERTIFICATE=$(cat <

    Once you set it you can access it as a regular env variable echo $MY_CERTIFICATE.

提交回复
热议问题