title: Blackbox: GPG decrypt fails (don't know ctb=00)
body: <p>I'm using <a href="https://github.com/StackExchange/blackbox" rel="noreferrer">Blackbox</a> to protect sensitive files in my repositories, but suddenly, inexplicably to me, it simply stopped working.</p>
  
  <p>I am running a GitLab CI deployment script, and the <code>blackbox_postdeploy</code> fails with message <code>gpg: [don't know] ctb=00</code>.</p>
  
  <p>I've been able to find out that <code>ctb=00</code> usually has to do with corrupt keychains, but since I'm running this on a clean Docker-container (through the GitLab CI) I don't know how to fix it.</p>
  
  <p>Here's the output from the GitLab CI script:</p>
  
  <pre><code>$ gpg -v --import &lt;(echo "$GPG_PRIVATE_KEY")
  gpg: directory `/root/.gnupg' created
  gpg: new configuration file `/root/.gnupg/gpg.conf' created
  gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
  gpg: keyring `/root/.gnupg/secring.gpg' created
  gpg: keyring `/root/.gnupg/pubring.gpg' created
  gpg: pub  4096R/ABC1234 2017-04-28  Bot &lt;bot@redacted.com&gt;
  gpg: /root/.gnupg/trustdb.gpg: trustdb created
  gpg: using PGP trust model
  gpg: key ABC1234: public key "Bot &lt;bot@redacted.com&gt;" imported
  gpg: Total number processed: 1
  gpg:               imported: 1  (RSA: 1)
  $ which ssh-agent || ( apt-get update -y &amp;&amp; apt-get install openssh-client -y )
  /usr/bin/ssh-agent
  $ eval $(ssh-agent -s)
  Agent pid 72
  $ ssh-add &lt;(echo "$SSH_PRIVATE_KEY")
  Identity added: /dev/fd/63 (rsa w/o comment)
  $ mkdir -p ~/.ssh
  $ [[ -f /.dockerenv ]] &amp;&amp; echo "$SSH_SERVER_HOSTKEYS" &gt; ~/.ssh/known_hosts
  $ git config --global url."git@gitlab.com:".insteadOf "https://gitlab.com/"
  $ ln -s /builds /go/src/gitlab.com
  $ cd /go/src/gitlab.com/me/mysystem
  $ blackbox_postdeploy
  ========== Importing keychain: START
  gpg: [don't know]: invalid packet (ctb=00)
  gpg: key export failed: invalid packet
  ERROR: Job failed: exit code 1
  </code></pre>
  
  <p>Things I've tried:</p>
  
  <ul>
  <li>Manually removing Blackbox files.</li>
  <li>Forcefully re-initializing Blackbox in the repository.</li>
  <li>Re-creating the public key for my deploy bot.</li>
  <li>Removing the <code>/root/.gnupg</code>-folder on the container before deploying.</li>
  </ul>
  
  <p>Can anyone help me along here? This is occasionally breaking my repositories, being a huge pain for my development process.</p>
  
  <p>Thank you.</p>