title: How to encode a SSH private key and then Decode it
body: <p>I am passing <code>private-key</code> as a <code>gitlab</code> environment variable. But when I echo it, it is altered, it is not really in the format of:</p>
  
  <pre><code>-----BEGIN RSA PRIVATE KEY----- 
  xxxxxxx 
  -----END RSA PRIVATE KEY-----
  </code></pre>
  
  <p>So I think the solution must be to <code>encode</code> it again and then <code>decode</code> it with <code>base64</code></p>
  
  <p>How can I do this with <code>bash</code> shell?</p>
  
  <p>What I tried is:</p>
  
  <pre><code>encode ./private-key 
  bash6d -d ./private-key
  </code></pre>
  
  <p>I have the doubt that this is not the way. Can someone please help me?</p>