gpg2 and git signing

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











up vote
0
down vote

favorite












I have a problem with gpg2 and signing my commits in git. I should preface all this by saying this all worked yesterday before I did an apt-get update && apt-get upgrade and a reboot.



Now when I try to sign my commits I get the following error message:




gpg: skipped "3C27FEA3B5758D9E": No secret key
gpg: signing failed: No secret key
error: gpg failed to sign the data
fatal: failed to write commit object



Actually, I seem to get it when I try to stash my changes too.



When I do a pgrep I can see that gpg-agent is running so I've killed it and restarted it.



I have also have this in my .bashrc file:



export GPG_TTY=$(tty)



mdhas@DEV-SRV-01 ~/dev/TestingRepo ( BranchAFeatureBFullVersion ) $ gpg2 --list-keys
/home/mdhas/.gnupg/pubring.gpg
------------------------------
pub rsa2048/FBJJJJ1C 2017-10-11 [SC]
uid [ultimate] Mark Dhas <mark.dhas@company.company>
sub rsa2048/3FDJJJJJ 2017-10-11 [E]

pub rsa2048/BFJJJJJ7 2017-11-17 [SC]
uid [ultimate] Mark Dhas <mark.dhas@company.company>
sub rsa2048/DEDDJJJJ 2017-11-17 [E]

pub rsa4096/7137JJJJ 2017-10-11 [SC] [expires: 2021-10-11]
uid [ unknown] co.co <mark.dhas@company.company>
sub rsa4096/A9BJJJJJ 2017-10-11 [E] [expires: 2021-10-11]

pub rsa4096/B57JJJJJ 2018-10-31 [SC] [expires: 2021-10-31]
uid [ unknown] Mark Dhas (New Key-Created on 2018-10-31) <mark.dhas@company.company>
sub rsa4096/36FJJJJJ 2018-10-31 [E] [expires: 2021-10-31]


Please ignore the JJJJJ's they are an attempt at a small amount of redaction for security purposes.



mdhas@DEV-SRV-01 ~/dev/TestingRepo ( BranchAFeatureBFullVersion ) $ gpg2 --list-secret-keys
/home/mdhas/.gnupg/pubring.gpg
------------------------------
sec rsa2048/FBJJJJ1C 2017-10-11 [SC]
uid [ultimate] Mark Dhas <mark.dhas@enginess.io>
ssb rsa2048/3FDJJJJJ 2017-10-11 [E]


And this is a section of my git config



user.name=Mark Dhas
user.email=mark.dhas@company.company
user.signingkey=3C2JJJJJJJJJJJJJ
core.editor=vim
gpg.program=/usr/bin/gpg2


Any ideas on how to rectify this issue would be great.









share





















  • I should also note that I created the gpg key on my macbook and then exported the public key to my ubuntu server. Importing it there with a gpg2 --import <filename>
    – Mark D
    5 mins ago















up vote
0
down vote

favorite












I have a problem with gpg2 and signing my commits in git. I should preface all this by saying this all worked yesterday before I did an apt-get update && apt-get upgrade and a reboot.



Now when I try to sign my commits I get the following error message:




gpg: skipped "3C27FEA3B5758D9E": No secret key
gpg: signing failed: No secret key
error: gpg failed to sign the data
fatal: failed to write commit object



Actually, I seem to get it when I try to stash my changes too.



When I do a pgrep I can see that gpg-agent is running so I've killed it and restarted it.



I have also have this in my .bashrc file:



export GPG_TTY=$(tty)



mdhas@DEV-SRV-01 ~/dev/TestingRepo ( BranchAFeatureBFullVersion ) $ gpg2 --list-keys
/home/mdhas/.gnupg/pubring.gpg
------------------------------
pub rsa2048/FBJJJJ1C 2017-10-11 [SC]
uid [ultimate] Mark Dhas <mark.dhas@company.company>
sub rsa2048/3FDJJJJJ 2017-10-11 [E]

pub rsa2048/BFJJJJJ7 2017-11-17 [SC]
uid [ultimate] Mark Dhas <mark.dhas@company.company>
sub rsa2048/DEDDJJJJ 2017-11-17 [E]

pub rsa4096/7137JJJJ 2017-10-11 [SC] [expires: 2021-10-11]
uid [ unknown] co.co <mark.dhas@company.company>
sub rsa4096/A9BJJJJJ 2017-10-11 [E] [expires: 2021-10-11]

pub rsa4096/B57JJJJJ 2018-10-31 [SC] [expires: 2021-10-31]
uid [ unknown] Mark Dhas (New Key-Created on 2018-10-31) <mark.dhas@company.company>
sub rsa4096/36FJJJJJ 2018-10-31 [E] [expires: 2021-10-31]


Please ignore the JJJJJ's they are an attempt at a small amount of redaction for security purposes.



mdhas@DEV-SRV-01 ~/dev/TestingRepo ( BranchAFeatureBFullVersion ) $ gpg2 --list-secret-keys
/home/mdhas/.gnupg/pubring.gpg
------------------------------
sec rsa2048/FBJJJJ1C 2017-10-11 [SC]
uid [ultimate] Mark Dhas <mark.dhas@enginess.io>
ssb rsa2048/3FDJJJJJ 2017-10-11 [E]


And this is a section of my git config



user.name=Mark Dhas
user.email=mark.dhas@company.company
user.signingkey=3C2JJJJJJJJJJJJJ
core.editor=vim
gpg.program=/usr/bin/gpg2


Any ideas on how to rectify this issue would be great.









share





















  • I should also note that I created the gpg key on my macbook and then exported the public key to my ubuntu server. Importing it there with a gpg2 --import <filename>
    – Mark D
    5 mins ago













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a problem with gpg2 and signing my commits in git. I should preface all this by saying this all worked yesterday before I did an apt-get update && apt-get upgrade and a reboot.



Now when I try to sign my commits I get the following error message:




gpg: skipped "3C27FEA3B5758D9E": No secret key
gpg: signing failed: No secret key
error: gpg failed to sign the data
fatal: failed to write commit object



Actually, I seem to get it when I try to stash my changes too.



When I do a pgrep I can see that gpg-agent is running so I've killed it and restarted it.



I have also have this in my .bashrc file:



export GPG_TTY=$(tty)



mdhas@DEV-SRV-01 ~/dev/TestingRepo ( BranchAFeatureBFullVersion ) $ gpg2 --list-keys
/home/mdhas/.gnupg/pubring.gpg
------------------------------
pub rsa2048/FBJJJJ1C 2017-10-11 [SC]
uid [ultimate] Mark Dhas <mark.dhas@company.company>
sub rsa2048/3FDJJJJJ 2017-10-11 [E]

pub rsa2048/BFJJJJJ7 2017-11-17 [SC]
uid [ultimate] Mark Dhas <mark.dhas@company.company>
sub rsa2048/DEDDJJJJ 2017-11-17 [E]

pub rsa4096/7137JJJJ 2017-10-11 [SC] [expires: 2021-10-11]
uid [ unknown] co.co <mark.dhas@company.company>
sub rsa4096/A9BJJJJJ 2017-10-11 [E] [expires: 2021-10-11]

pub rsa4096/B57JJJJJ 2018-10-31 [SC] [expires: 2021-10-31]
uid [ unknown] Mark Dhas (New Key-Created on 2018-10-31) <mark.dhas@company.company>
sub rsa4096/36FJJJJJ 2018-10-31 [E] [expires: 2021-10-31]


Please ignore the JJJJJ's they are an attempt at a small amount of redaction for security purposes.



mdhas@DEV-SRV-01 ~/dev/TestingRepo ( BranchAFeatureBFullVersion ) $ gpg2 --list-secret-keys
/home/mdhas/.gnupg/pubring.gpg
------------------------------
sec rsa2048/FBJJJJ1C 2017-10-11 [SC]
uid [ultimate] Mark Dhas <mark.dhas@enginess.io>
ssb rsa2048/3FDJJJJJ 2017-10-11 [E]


And this is a section of my git config



user.name=Mark Dhas
user.email=mark.dhas@company.company
user.signingkey=3C2JJJJJJJJJJJJJ
core.editor=vim
gpg.program=/usr/bin/gpg2


Any ideas on how to rectify this issue would be great.









share













I have a problem with gpg2 and signing my commits in git. I should preface all this by saying this all worked yesterday before I did an apt-get update && apt-get upgrade and a reboot.



Now when I try to sign my commits I get the following error message:




gpg: skipped "3C27FEA3B5758D9E": No secret key
gpg: signing failed: No secret key
error: gpg failed to sign the data
fatal: failed to write commit object



Actually, I seem to get it when I try to stash my changes too.



When I do a pgrep I can see that gpg-agent is running so I've killed it and restarted it.



I have also have this in my .bashrc file:



export GPG_TTY=$(tty)



mdhas@DEV-SRV-01 ~/dev/TestingRepo ( BranchAFeatureBFullVersion ) $ gpg2 --list-keys
/home/mdhas/.gnupg/pubring.gpg
------------------------------
pub rsa2048/FBJJJJ1C 2017-10-11 [SC]
uid [ultimate] Mark Dhas <mark.dhas@company.company>
sub rsa2048/3FDJJJJJ 2017-10-11 [E]

pub rsa2048/BFJJJJJ7 2017-11-17 [SC]
uid [ultimate] Mark Dhas <mark.dhas@company.company>
sub rsa2048/DEDDJJJJ 2017-11-17 [E]

pub rsa4096/7137JJJJ 2017-10-11 [SC] [expires: 2021-10-11]
uid [ unknown] co.co <mark.dhas@company.company>
sub rsa4096/A9BJJJJJ 2017-10-11 [E] [expires: 2021-10-11]

pub rsa4096/B57JJJJJ 2018-10-31 [SC] [expires: 2021-10-31]
uid [ unknown] Mark Dhas (New Key-Created on 2018-10-31) <mark.dhas@company.company>
sub rsa4096/36FJJJJJ 2018-10-31 [E] [expires: 2021-10-31]


Please ignore the JJJJJ's they are an attempt at a small amount of redaction for security purposes.



mdhas@DEV-SRV-01 ~/dev/TestingRepo ( BranchAFeatureBFullVersion ) $ gpg2 --list-secret-keys
/home/mdhas/.gnupg/pubring.gpg
------------------------------
sec rsa2048/FBJJJJ1C 2017-10-11 [SC]
uid [ultimate] Mark Dhas <mark.dhas@enginess.io>
ssb rsa2048/3FDJJJJJ 2017-10-11 [E]


And this is a section of my git config



user.name=Mark Dhas
user.email=mark.dhas@company.company
user.signingkey=3C2JJJJJJJJJJJJJ
core.editor=vim
gpg.program=/usr/bin/gpg2


Any ideas on how to rectify this issue would be great.







ubuntu git gpg





share












share










share



share










asked 9 mins ago









Mark D

5722720




5722720











  • I should also note that I created the gpg key on my macbook and then exported the public key to my ubuntu server. Importing it there with a gpg2 --import <filename>
    – Mark D
    5 mins ago

















  • I should also note that I created the gpg key on my macbook and then exported the public key to my ubuntu server. Importing it there with a gpg2 --import <filename>
    – Mark D
    5 mins ago
















I should also note that I created the gpg key on my macbook and then exported the public key to my ubuntu server. Importing it there with a gpg2 --import <filename>
– Mark D
5 mins ago





I should also note that I created the gpg key on my macbook and then exported the public key to my ubuntu server. Importing it there with a gpg2 --import <filename>
– Mark D
5 mins ago
















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: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
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%2f478962%2fgpg2-and-git-signing%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%2f478962%2fgpg2-and-git-signing%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)