Recovering GPG keys from a backup directory
I have a backup image mounted at /mnt
. I need to recover (and revoke) a key in the secret keyring on this backup.
How can I list keys and generate a revocation key for a key stored in this other keyring?
When I do:
gpg --homedir /mnt/home/naftuli/.gnupg --list-keys
I see the keys installed locally and not the keys installed in the backup's keyring.
What's really strange is that if I chroot
to the /mnt
folder and run gpg --list-keys
, I still see the keys in the other keyring.
Any ideas?
gpg
bumped to the homepage by Community♦ 23 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 1 more comment
I have a backup image mounted at /mnt
. I need to recover (and revoke) a key in the secret keyring on this backup.
How can I list keys and generate a revocation key for a key stored in this other keyring?
When I do:
gpg --homedir /mnt/home/naftuli/.gnupg --list-keys
I see the keys installed locally and not the keys installed in the backup's keyring.
What's really strange is that if I chroot
to the /mnt
folder and run gpg --list-keys
, I still see the keys in the other keyring.
Any ideas?
gpg
bumped to the homepage by Community♦ 23 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
have you triedHOME=/mnt/home/naftuli/ gpg --list-keys
?
– hildred
Dec 5 '13 at 22:54
Same thing. It shows the results from the other keyring. One of the keys was just generated today, and the backup is from 2013/11/29, so the new key really shouldn't be in that backup.
– Naftuli Kay
Dec 5 '13 at 22:56
do you have any absolute paths in /mnt/home/naftuli/.gnupg/gpg.conf? what doesls -lnd /mnt/home/naftuli/ /home/naftuli/
say?
– hildred
Dec 5 '13 at 23:00
3
You probably have gpg-agent running, and are listing keys in the agent. Try--no-use-agent
– derobert
Dec 5 '13 at 23:06
Looks like something weird was going on, the mounted directory was a loop for some reason to /. No idea why, but working around it.
– Naftuli Kay
Dec 5 '13 at 23:08
|
show 1 more comment
I have a backup image mounted at /mnt
. I need to recover (and revoke) a key in the secret keyring on this backup.
How can I list keys and generate a revocation key for a key stored in this other keyring?
When I do:
gpg --homedir /mnt/home/naftuli/.gnupg --list-keys
I see the keys installed locally and not the keys installed in the backup's keyring.
What's really strange is that if I chroot
to the /mnt
folder and run gpg --list-keys
, I still see the keys in the other keyring.
Any ideas?
gpg
I have a backup image mounted at /mnt
. I need to recover (and revoke) a key in the secret keyring on this backup.
How can I list keys and generate a revocation key for a key stored in this other keyring?
When I do:
gpg --homedir /mnt/home/naftuli/.gnupg --list-keys
I see the keys installed locally and not the keys installed in the backup's keyring.
What's really strange is that if I chroot
to the /mnt
folder and run gpg --list-keys
, I still see the keys in the other keyring.
Any ideas?
gpg
gpg
edited Dec 5 '13 at 22:58
Naftuli Kay
asked Dec 5 '13 at 22:40
Naftuli KayNaftuli Kay
12.6k56162256
12.6k56162256
bumped to the homepage by Community♦ 23 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 23 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
have you triedHOME=/mnt/home/naftuli/ gpg --list-keys
?
– hildred
Dec 5 '13 at 22:54
Same thing. It shows the results from the other keyring. One of the keys was just generated today, and the backup is from 2013/11/29, so the new key really shouldn't be in that backup.
– Naftuli Kay
Dec 5 '13 at 22:56
do you have any absolute paths in /mnt/home/naftuli/.gnupg/gpg.conf? what doesls -lnd /mnt/home/naftuli/ /home/naftuli/
say?
– hildred
Dec 5 '13 at 23:00
3
You probably have gpg-agent running, and are listing keys in the agent. Try--no-use-agent
– derobert
Dec 5 '13 at 23:06
Looks like something weird was going on, the mounted directory was a loop for some reason to /. No idea why, but working around it.
– Naftuli Kay
Dec 5 '13 at 23:08
|
show 1 more comment
have you triedHOME=/mnt/home/naftuli/ gpg --list-keys
?
– hildred
Dec 5 '13 at 22:54
Same thing. It shows the results from the other keyring. One of the keys was just generated today, and the backup is from 2013/11/29, so the new key really shouldn't be in that backup.
– Naftuli Kay
Dec 5 '13 at 22:56
do you have any absolute paths in /mnt/home/naftuli/.gnupg/gpg.conf? what doesls -lnd /mnt/home/naftuli/ /home/naftuli/
say?
– hildred
Dec 5 '13 at 23:00
3
You probably have gpg-agent running, and are listing keys in the agent. Try--no-use-agent
– derobert
Dec 5 '13 at 23:06
Looks like something weird was going on, the mounted directory was a loop for some reason to /. No idea why, but working around it.
– Naftuli Kay
Dec 5 '13 at 23:08
have you tried
HOME=/mnt/home/naftuli/ gpg --list-keys
?– hildred
Dec 5 '13 at 22:54
have you tried
HOME=/mnt/home/naftuli/ gpg --list-keys
?– hildred
Dec 5 '13 at 22:54
Same thing. It shows the results from the other keyring. One of the keys was just generated today, and the backup is from 2013/11/29, so the new key really shouldn't be in that backup.
– Naftuli Kay
Dec 5 '13 at 22:56
Same thing. It shows the results from the other keyring. One of the keys was just generated today, and the backup is from 2013/11/29, so the new key really shouldn't be in that backup.
– Naftuli Kay
Dec 5 '13 at 22:56
do you have any absolute paths in /mnt/home/naftuli/.gnupg/gpg.conf? what does
ls -lnd /mnt/home/naftuli/ /home/naftuli/
say?– hildred
Dec 5 '13 at 23:00
do you have any absolute paths in /mnt/home/naftuli/.gnupg/gpg.conf? what does
ls -lnd /mnt/home/naftuli/ /home/naftuli/
say?– hildred
Dec 5 '13 at 23:00
3
3
You probably have gpg-agent running, and are listing keys in the agent. Try
--no-use-agent
– derobert
Dec 5 '13 at 23:06
You probably have gpg-agent running, and are listing keys in the agent. Try
--no-use-agent
– derobert
Dec 5 '13 at 23:06
Looks like something weird was going on, the mounted directory was a loop for some reason to /. No idea why, but working around it.
– Naftuli Kay
Dec 5 '13 at 23:08
Looks like something weird was going on, the mounted directory was a loop for some reason to /. No idea why, but working around it.
– Naftuli Kay
Dec 5 '13 at 23:08
|
show 1 more comment
2 Answers
2
active
oldest
votes
If chrooting, killing the agent, etc. don't work for you,
swap the gpg folders, and reboot.
If you still see your new keys, something isn't right in your setup, or the folder paths are not what you think they are.
add a comment |
no need to chroot, I often generate wot maps / diagrams from a separate gpg db than my main, (for example a work team). to do this export GNUPGHOME
export GNUPGHOME=/mnt/home/naftuli
cd $GNUGPHOME
gpg --list-keys
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f103938%2frecovering-gpg-keys-from-a-backup-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If chrooting, killing the agent, etc. don't work for you,
swap the gpg folders, and reboot.
If you still see your new keys, something isn't right in your setup, or the folder paths are not what you think they are.
add a comment |
If chrooting, killing the agent, etc. don't work for you,
swap the gpg folders, and reboot.
If you still see your new keys, something isn't right in your setup, or the folder paths are not what you think they are.
add a comment |
If chrooting, killing the agent, etc. don't work for you,
swap the gpg folders, and reboot.
If you still see your new keys, something isn't right in your setup, or the folder paths are not what you think they are.
If chrooting, killing the agent, etc. don't work for you,
swap the gpg folders, and reboot.
If you still see your new keys, something isn't right in your setup, or the folder paths are not what you think they are.
answered Jul 25 '16 at 9:17
Matthias ŠMatthias Š
1
1
add a comment |
add a comment |
no need to chroot, I often generate wot maps / diagrams from a separate gpg db than my main, (for example a work team). to do this export GNUPGHOME
export GNUPGHOME=/mnt/home/naftuli
cd $GNUGPHOME
gpg --list-keys
add a comment |
no need to chroot, I often generate wot maps / diagrams from a separate gpg db than my main, (for example a work team). to do this export GNUPGHOME
export GNUPGHOME=/mnt/home/naftuli
cd $GNUGPHOME
gpg --list-keys
add a comment |
no need to chroot, I often generate wot maps / diagrams from a separate gpg db than my main, (for example a work team). to do this export GNUPGHOME
export GNUPGHOME=/mnt/home/naftuli
cd $GNUGPHOME
gpg --list-keys
no need to chroot, I often generate wot maps / diagrams from a separate gpg db than my main, (for example a work team). to do this export GNUPGHOME
export GNUPGHOME=/mnt/home/naftuli
cd $GNUGPHOME
gpg --list-keys
answered Oct 25 '16 at 22:43
mikejoneseymikejonesey
1,400415
1,400415
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f103938%2frecovering-gpg-keys-from-a-backup-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
have you tried
HOME=/mnt/home/naftuli/ gpg --list-keys
?– hildred
Dec 5 '13 at 22:54
Same thing. It shows the results from the other keyring. One of the keys was just generated today, and the backup is from 2013/11/29, so the new key really shouldn't be in that backup.
– Naftuli Kay
Dec 5 '13 at 22:56
do you have any absolute paths in /mnt/home/naftuli/.gnupg/gpg.conf? what does
ls -lnd /mnt/home/naftuli/ /home/naftuli/
say?– hildred
Dec 5 '13 at 23:00
3
You probably have gpg-agent running, and are listing keys in the agent. Try
--no-use-agent
– derobert
Dec 5 '13 at 23:06
Looks like something weird was going on, the mounted directory was a loop for some reason to /. No idea why, but working around it.
– Naftuli Kay
Dec 5 '13 at 23:08