How to solve gpg: bad data signature from key: KEY_ID Wrong key usage (0x19, 0x2)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
0
down vote

favorite












I'm using Arch Linux Linux uplink 4.14.56-1-lts #1 SMP Tue Jul 17 20:11:42 CEST 2018 x86_64 GNU/Linux. I'm trying to solve a problem I'm currently have with GnuPG 2.2.9 (libgcrypt 1.8.3), but I've noticed I have these errors showing up all the time, for any operation I perform with gpg:



gpg: bad data signature from key 8975BA8B6100C6B1: Wrong key usage (0x19, 0x2)
gpg: bad data signature from key DEA16371974031A5: Wrong key usage (0x19, 0x2)


...so I'm not sure if that could be interfering with my other problem: signing Git commits and getting gpg failed to sign the data failed to write commit object.




This is the list of public/private keys that I have:



[gorre@uplink ~]$ gpg --list-keys
gpg: bad data signature from key 8975BA8B6100C6B1: Wrong key usage (0x19, 0x2)
gpg: bad data signature from key DEA16371974031A5: Wrong key usage (0x19, 0x2)
/home/gorre/.gnupg/pubring.kbx
------------------------------
pub rsa4096 2015-07-21 [SC] [expires: 2019-07-21]
94AE36675C464D64BAFA68DD7434390BDBE9B9C5
uid [ unknown] Colin Ihrig ...
sub rsa4096 2015-07-21 [E] [expires: 2019-07-21]

pub rsa4096 2014-04-01 [SCEA] [expires: 2024-03-29]
FD3A5288F042B6850C66B31F09FE44734EB7990E
uid [ unknown] Jeremiah Senkpiel ...
uid [ unknown] keybase.io/fishrock ...
sub rsa4096 2014-04-01 [SEA] [expires: 2024-03-29]

pub rsa4096 2014-11-10 [SCEA]
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
uid [ unknown] keybase.io/jasnell ...
uid [ unknown] James M Snell ...
uid [ unknown] James M Snell ...
sub rsa2048 2014-11-10 [S] [expires: 2022-11-08]
sub rsa2048 2014-11-10 [E] [expires: 2022-11-08]

pub rsa2048 2013-11-18 [SC]
DD8F2338BAE7501E3DD5AC78C273792F7D83545D
uid [ unknown] Rod Vagg ...
uid [ unknown] Rod Vagg ...
sub rsa2048 2013-11-18 [E]

pub rsa4096 2016-01-12 [SC]
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins (Not used after January 2017) ...
sub rsa2048 2016-01-12 [E] [expires: 2024-01-10]
sub rsa2048 2016-01-12 [SA] [expires: 2024-01-10]

pub rsa4096 2015-12-17 [SC] [expires: 2019-12-17]
B9AE9905FFD7803F25714661B63B535A4C206CA9
uid [ unknown] Evan Lucas ...
uid [ unknown] Evan Lucas ...
sub rsa4096 2015-12-17 [E] [expires: 2019-12-17]

pub rsa4096 2016-04-07 [SC]
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600
uid [ unknown] Michaël Zasso (Targos) ...
sub rsa4096 2016-04-07 [E]

pub rsa4096 2016-10-07 [SC]
77984A986EBC2AA786BC0F66B01FBB92821C587A
uid [ unknown] Gibson Fahnestock ...
sub rsa4096 2016-10-07 [E]

pub rsa4096 2018-06-12 [SC]
B1BEB985FA77CDF913E2EAE88E0DCA371CC3F4EC
uid [ultimate] Gorre ...
sub rsa4096 2018-06-12 [E]

[gorre@uplink ~]$ gpg --list-secret-keys
/home/gorre/.gnupg/pubring.kbx
------------------------------
sec rsa4096 2018-06-12 [SC]
MY_SECRET_KEY
uid [ultimate] Gorre ...
ssb rsa4096 2018-06-12 [E]



UPDATE



Looks like my initial issue was somehow with the gpg-agent; I ended up configuring $HOME/.gnupg/gpg-agent.conf as:



[gorre@uplink ~]$ nano ~/.gnupg/gpg-agent.conf
max-cache-ttl 86400
default-cache-ttl 86400

default-cache-ttl-ssh 86400
max-cache-ttl-ssh 86400

# Run pacman -Ql pinentry | grep /usr/bin/ for more options, I'm using Gnome 2.x
pinentry-program /usr/bin/pinentry-gnome3

[gorre@uplink ~]$ gpg-connect-agent reloadagent /bye


...and everything works fine now – for what I wanted. Still, those errors are there, every time I execute the gpg command, but it looks like it doesn't impact the functionality of gpg – to the extent of what I do with it.







share|improve this question





















  • When you create a subkey you can specify if it is for signature or encryption or both. The error message is probably because you are using a key created for encryption in git, which needs only to sign commit messages.
    – Patrick Mevzek
    Jul 29 at 0:01










  • Somehow, I think that's either related with gpg version 2.9 or something in Arch Linux...or both. I see exactly the same error messages on some builds for Antergos.
    – x80486
    Jul 29 at 0:09











  • Your output does not show the key ID seen in the git output. Try adding --with-subkey-fingerprint
    – Patrick Mevzek
    Jul 29 at 17:45
















up vote
0
down vote

favorite












I'm using Arch Linux Linux uplink 4.14.56-1-lts #1 SMP Tue Jul 17 20:11:42 CEST 2018 x86_64 GNU/Linux. I'm trying to solve a problem I'm currently have with GnuPG 2.2.9 (libgcrypt 1.8.3), but I've noticed I have these errors showing up all the time, for any operation I perform with gpg:



gpg: bad data signature from key 8975BA8B6100C6B1: Wrong key usage (0x19, 0x2)
gpg: bad data signature from key DEA16371974031A5: Wrong key usage (0x19, 0x2)


...so I'm not sure if that could be interfering with my other problem: signing Git commits and getting gpg failed to sign the data failed to write commit object.




This is the list of public/private keys that I have:



[gorre@uplink ~]$ gpg --list-keys
gpg: bad data signature from key 8975BA8B6100C6B1: Wrong key usage (0x19, 0x2)
gpg: bad data signature from key DEA16371974031A5: Wrong key usage (0x19, 0x2)
/home/gorre/.gnupg/pubring.kbx
------------------------------
pub rsa4096 2015-07-21 [SC] [expires: 2019-07-21]
94AE36675C464D64BAFA68DD7434390BDBE9B9C5
uid [ unknown] Colin Ihrig ...
sub rsa4096 2015-07-21 [E] [expires: 2019-07-21]

pub rsa4096 2014-04-01 [SCEA] [expires: 2024-03-29]
FD3A5288F042B6850C66B31F09FE44734EB7990E
uid [ unknown] Jeremiah Senkpiel ...
uid [ unknown] keybase.io/fishrock ...
sub rsa4096 2014-04-01 [SEA] [expires: 2024-03-29]

pub rsa4096 2014-11-10 [SCEA]
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
uid [ unknown] keybase.io/jasnell ...
uid [ unknown] James M Snell ...
uid [ unknown] James M Snell ...
sub rsa2048 2014-11-10 [S] [expires: 2022-11-08]
sub rsa2048 2014-11-10 [E] [expires: 2022-11-08]

pub rsa2048 2013-11-18 [SC]
DD8F2338BAE7501E3DD5AC78C273792F7D83545D
uid [ unknown] Rod Vagg ...
uid [ unknown] Rod Vagg ...
sub rsa2048 2013-11-18 [E]

pub rsa4096 2016-01-12 [SC]
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins (Not used after January 2017) ...
sub rsa2048 2016-01-12 [E] [expires: 2024-01-10]
sub rsa2048 2016-01-12 [SA] [expires: 2024-01-10]

pub rsa4096 2015-12-17 [SC] [expires: 2019-12-17]
B9AE9905FFD7803F25714661B63B535A4C206CA9
uid [ unknown] Evan Lucas ...
uid [ unknown] Evan Lucas ...
sub rsa4096 2015-12-17 [E] [expires: 2019-12-17]

pub rsa4096 2016-04-07 [SC]
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600
uid [ unknown] Michaël Zasso (Targos) ...
sub rsa4096 2016-04-07 [E]

pub rsa4096 2016-10-07 [SC]
77984A986EBC2AA786BC0F66B01FBB92821C587A
uid [ unknown] Gibson Fahnestock ...
sub rsa4096 2016-10-07 [E]

pub rsa4096 2018-06-12 [SC]
B1BEB985FA77CDF913E2EAE88E0DCA371CC3F4EC
uid [ultimate] Gorre ...
sub rsa4096 2018-06-12 [E]

[gorre@uplink ~]$ gpg --list-secret-keys
/home/gorre/.gnupg/pubring.kbx
------------------------------
sec rsa4096 2018-06-12 [SC]
MY_SECRET_KEY
uid [ultimate] Gorre ...
ssb rsa4096 2018-06-12 [E]



UPDATE



Looks like my initial issue was somehow with the gpg-agent; I ended up configuring $HOME/.gnupg/gpg-agent.conf as:



[gorre@uplink ~]$ nano ~/.gnupg/gpg-agent.conf
max-cache-ttl 86400
default-cache-ttl 86400

default-cache-ttl-ssh 86400
max-cache-ttl-ssh 86400

# Run pacman -Ql pinentry | grep /usr/bin/ for more options, I'm using Gnome 2.x
pinentry-program /usr/bin/pinentry-gnome3

[gorre@uplink ~]$ gpg-connect-agent reloadagent /bye


...and everything works fine now – for what I wanted. Still, those errors are there, every time I execute the gpg command, but it looks like it doesn't impact the functionality of gpg – to the extent of what I do with it.







share|improve this question





















  • When you create a subkey you can specify if it is for signature or encryption or both. The error message is probably because you are using a key created for encryption in git, which needs only to sign commit messages.
    – Patrick Mevzek
    Jul 29 at 0:01










  • Somehow, I think that's either related with gpg version 2.9 or something in Arch Linux...or both. I see exactly the same error messages on some builds for Antergos.
    – x80486
    Jul 29 at 0:09











  • Your output does not show the key ID seen in the git output. Try adding --with-subkey-fingerprint
    – Patrick Mevzek
    Jul 29 at 17:45












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm using Arch Linux Linux uplink 4.14.56-1-lts #1 SMP Tue Jul 17 20:11:42 CEST 2018 x86_64 GNU/Linux. I'm trying to solve a problem I'm currently have with GnuPG 2.2.9 (libgcrypt 1.8.3), but I've noticed I have these errors showing up all the time, for any operation I perform with gpg:



gpg: bad data signature from key 8975BA8B6100C6B1: Wrong key usage (0x19, 0x2)
gpg: bad data signature from key DEA16371974031A5: Wrong key usage (0x19, 0x2)


...so I'm not sure if that could be interfering with my other problem: signing Git commits and getting gpg failed to sign the data failed to write commit object.




This is the list of public/private keys that I have:



[gorre@uplink ~]$ gpg --list-keys
gpg: bad data signature from key 8975BA8B6100C6B1: Wrong key usage (0x19, 0x2)
gpg: bad data signature from key DEA16371974031A5: Wrong key usage (0x19, 0x2)
/home/gorre/.gnupg/pubring.kbx
------------------------------
pub rsa4096 2015-07-21 [SC] [expires: 2019-07-21]
94AE36675C464D64BAFA68DD7434390BDBE9B9C5
uid [ unknown] Colin Ihrig ...
sub rsa4096 2015-07-21 [E] [expires: 2019-07-21]

pub rsa4096 2014-04-01 [SCEA] [expires: 2024-03-29]
FD3A5288F042B6850C66B31F09FE44734EB7990E
uid [ unknown] Jeremiah Senkpiel ...
uid [ unknown] keybase.io/fishrock ...
sub rsa4096 2014-04-01 [SEA] [expires: 2024-03-29]

pub rsa4096 2014-11-10 [SCEA]
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
uid [ unknown] keybase.io/jasnell ...
uid [ unknown] James M Snell ...
uid [ unknown] James M Snell ...
sub rsa2048 2014-11-10 [S] [expires: 2022-11-08]
sub rsa2048 2014-11-10 [E] [expires: 2022-11-08]

pub rsa2048 2013-11-18 [SC]
DD8F2338BAE7501E3DD5AC78C273792F7D83545D
uid [ unknown] Rod Vagg ...
uid [ unknown] Rod Vagg ...
sub rsa2048 2013-11-18 [E]

pub rsa4096 2016-01-12 [SC]
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins (Not used after January 2017) ...
sub rsa2048 2016-01-12 [E] [expires: 2024-01-10]
sub rsa2048 2016-01-12 [SA] [expires: 2024-01-10]

pub rsa4096 2015-12-17 [SC] [expires: 2019-12-17]
B9AE9905FFD7803F25714661B63B535A4C206CA9
uid [ unknown] Evan Lucas ...
uid [ unknown] Evan Lucas ...
sub rsa4096 2015-12-17 [E] [expires: 2019-12-17]

pub rsa4096 2016-04-07 [SC]
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600
uid [ unknown] Michaël Zasso (Targos) ...
sub rsa4096 2016-04-07 [E]

pub rsa4096 2016-10-07 [SC]
77984A986EBC2AA786BC0F66B01FBB92821C587A
uid [ unknown] Gibson Fahnestock ...
sub rsa4096 2016-10-07 [E]

pub rsa4096 2018-06-12 [SC]
B1BEB985FA77CDF913E2EAE88E0DCA371CC3F4EC
uid [ultimate] Gorre ...
sub rsa4096 2018-06-12 [E]

[gorre@uplink ~]$ gpg --list-secret-keys
/home/gorre/.gnupg/pubring.kbx
------------------------------
sec rsa4096 2018-06-12 [SC]
MY_SECRET_KEY
uid [ultimate] Gorre ...
ssb rsa4096 2018-06-12 [E]



UPDATE



Looks like my initial issue was somehow with the gpg-agent; I ended up configuring $HOME/.gnupg/gpg-agent.conf as:



[gorre@uplink ~]$ nano ~/.gnupg/gpg-agent.conf
max-cache-ttl 86400
default-cache-ttl 86400

default-cache-ttl-ssh 86400
max-cache-ttl-ssh 86400

# Run pacman -Ql pinentry | grep /usr/bin/ for more options, I'm using Gnome 2.x
pinentry-program /usr/bin/pinentry-gnome3

[gorre@uplink ~]$ gpg-connect-agent reloadagent /bye


...and everything works fine now – for what I wanted. Still, those errors are there, every time I execute the gpg command, but it looks like it doesn't impact the functionality of gpg – to the extent of what I do with it.







share|improve this question













I'm using Arch Linux Linux uplink 4.14.56-1-lts #1 SMP Tue Jul 17 20:11:42 CEST 2018 x86_64 GNU/Linux. I'm trying to solve a problem I'm currently have with GnuPG 2.2.9 (libgcrypt 1.8.3), but I've noticed I have these errors showing up all the time, for any operation I perform with gpg:



gpg: bad data signature from key 8975BA8B6100C6B1: Wrong key usage (0x19, 0x2)
gpg: bad data signature from key DEA16371974031A5: Wrong key usage (0x19, 0x2)


...so I'm not sure if that could be interfering with my other problem: signing Git commits and getting gpg failed to sign the data failed to write commit object.




This is the list of public/private keys that I have:



[gorre@uplink ~]$ gpg --list-keys
gpg: bad data signature from key 8975BA8B6100C6B1: Wrong key usage (0x19, 0x2)
gpg: bad data signature from key DEA16371974031A5: Wrong key usage (0x19, 0x2)
/home/gorre/.gnupg/pubring.kbx
------------------------------
pub rsa4096 2015-07-21 [SC] [expires: 2019-07-21]
94AE36675C464D64BAFA68DD7434390BDBE9B9C5
uid [ unknown] Colin Ihrig ...
sub rsa4096 2015-07-21 [E] [expires: 2019-07-21]

pub rsa4096 2014-04-01 [SCEA] [expires: 2024-03-29]
FD3A5288F042B6850C66B31F09FE44734EB7990E
uid [ unknown] Jeremiah Senkpiel ...
uid [ unknown] keybase.io/fishrock ...
sub rsa4096 2014-04-01 [SEA] [expires: 2024-03-29]

pub rsa4096 2014-11-10 [SCEA]
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
uid [ unknown] keybase.io/jasnell ...
uid [ unknown] James M Snell ...
uid [ unknown] James M Snell ...
sub rsa2048 2014-11-10 [S] [expires: 2022-11-08]
sub rsa2048 2014-11-10 [E] [expires: 2022-11-08]

pub rsa2048 2013-11-18 [SC]
DD8F2338BAE7501E3DD5AC78C273792F7D83545D
uid [ unknown] Rod Vagg ...
uid [ unknown] Rod Vagg ...
sub rsa2048 2013-11-18 [E]

pub rsa4096 2016-01-12 [SC]
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins ...
uid [ unknown] Myles Borins (Not used after January 2017) ...
sub rsa2048 2016-01-12 [E] [expires: 2024-01-10]
sub rsa2048 2016-01-12 [SA] [expires: 2024-01-10]

pub rsa4096 2015-12-17 [SC] [expires: 2019-12-17]
B9AE9905FFD7803F25714661B63B535A4C206CA9
uid [ unknown] Evan Lucas ...
uid [ unknown] Evan Lucas ...
sub rsa4096 2015-12-17 [E] [expires: 2019-12-17]

pub rsa4096 2016-04-07 [SC]
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600
uid [ unknown] Michaël Zasso (Targos) ...
sub rsa4096 2016-04-07 [E]

pub rsa4096 2016-10-07 [SC]
77984A986EBC2AA786BC0F66B01FBB92821C587A
uid [ unknown] Gibson Fahnestock ...
sub rsa4096 2016-10-07 [E]

pub rsa4096 2018-06-12 [SC]
B1BEB985FA77CDF913E2EAE88E0DCA371CC3F4EC
uid [ultimate] Gorre ...
sub rsa4096 2018-06-12 [E]

[gorre@uplink ~]$ gpg --list-secret-keys
/home/gorre/.gnupg/pubring.kbx
------------------------------
sec rsa4096 2018-06-12 [SC]
MY_SECRET_KEY
uid [ultimate] Gorre ...
ssb rsa4096 2018-06-12 [E]



UPDATE



Looks like my initial issue was somehow with the gpg-agent; I ended up configuring $HOME/.gnupg/gpg-agent.conf as:



[gorre@uplink ~]$ nano ~/.gnupg/gpg-agent.conf
max-cache-ttl 86400
default-cache-ttl 86400

default-cache-ttl-ssh 86400
max-cache-ttl-ssh 86400

# Run pacman -Ql pinentry | grep /usr/bin/ for more options, I'm using Gnome 2.x
pinentry-program /usr/bin/pinentry-gnome3

[gorre@uplink ~]$ gpg-connect-agent reloadagent /bye


...and everything works fine now – for what I wanted. Still, those errors are there, every time I execute the gpg command, but it looks like it doesn't impact the functionality of gpg – to the extent of what I do with it.









share|improve this question












share|improve this question




share|improve this question








edited Jul 27 at 17:31









jasonwryan

46.3k14123173




46.3k14123173









asked Jul 27 at 15:16









x80486

21311




21311











  • When you create a subkey you can specify if it is for signature or encryption or both. The error message is probably because you are using a key created for encryption in git, which needs only to sign commit messages.
    – Patrick Mevzek
    Jul 29 at 0:01










  • Somehow, I think that's either related with gpg version 2.9 or something in Arch Linux...or both. I see exactly the same error messages on some builds for Antergos.
    – x80486
    Jul 29 at 0:09











  • Your output does not show the key ID seen in the git output. Try adding --with-subkey-fingerprint
    – Patrick Mevzek
    Jul 29 at 17:45
















  • When you create a subkey you can specify if it is for signature or encryption or both. The error message is probably because you are using a key created for encryption in git, which needs only to sign commit messages.
    – Patrick Mevzek
    Jul 29 at 0:01










  • Somehow, I think that's either related with gpg version 2.9 or something in Arch Linux...or both. I see exactly the same error messages on some builds for Antergos.
    – x80486
    Jul 29 at 0:09











  • Your output does not show the key ID seen in the git output. Try adding --with-subkey-fingerprint
    – Patrick Mevzek
    Jul 29 at 17:45















When you create a subkey you can specify if it is for signature or encryption or both. The error message is probably because you are using a key created for encryption in git, which needs only to sign commit messages.
– Patrick Mevzek
Jul 29 at 0:01




When you create a subkey you can specify if it is for signature or encryption or both. The error message is probably because you are using a key created for encryption in git, which needs only to sign commit messages.
– Patrick Mevzek
Jul 29 at 0:01












Somehow, I think that's either related with gpg version 2.9 or something in Arch Linux...or both. I see exactly the same error messages on some builds for Antergos.
– x80486
Jul 29 at 0:09





Somehow, I think that's either related with gpg version 2.9 or something in Arch Linux...or both. I see exactly the same error messages on some builds for Antergos.
– x80486
Jul 29 at 0:09













Your output does not show the key ID seen in the git output. Try adding --with-subkey-fingerprint
– Patrick Mevzek
Jul 29 at 17:45




Your output does not show the key ID seen in the git output. Try adding --with-subkey-fingerprint
– Patrick Mevzek
Jul 29 at 17:45















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f458870%2fhow-to-solve-gpg-bad-data-signature-from-key-key-id-wrong-key-usage-0x19-0x2%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f458870%2fhow-to-solve-gpg-bad-data-signature-from-key-key-id-wrong-key-usage-0x19-0x2%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay