title: Git error: gpg failed to sign the data on Linux
body: <p>I am having trouble signing commits. With the following git config:</p>
  
  <pre><code>user.name=Bob
  user.email=[bob's email]
  user.signingkey=ABCDEFGH
  user.user=bob1
  gpg.program=gpg2
  </code></pre>
  
  <p>I was told to include only the first eight characters of the secret key.</p>
  
  <p>After staging, upon <code>git commit -S -m "commit message"</code>, I receive the following errors:</p>
  
  <pre><code>error: gpg failed to sign the data
  fatal: failed to write commit object
  </code></pre>
  
  <p>It seems that most users who encounter this error are on Macs and have some extra setup to do. But I'm on Kali Linux.</p>
  
  <p>Any advice?</p>