Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
BostX committed Dec 23, 2023
1 parent aec7878 commit 97335dc
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
22 changes: 22 additions & 0 deletions notes/editors/emacs.scrbl
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
#lang notes

@block{@block-name{Signature made by expired key}
When:
An error occurred ... (error: (bad-signature queue-0.2.el.sig))
Then:
1. in the *Error* buffer look fo:
Signature made by expired key <some-expired-key>
and try to update the GPG keys manually
gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys <some-expired-key>
alternativelly:
1. (setq package-check-signature nil)
2. M-x dotspacemacs/sync-configuration-layers / ~SPC f e R~
3. M-x spacemacs/restart-emacs-resume-layouts / ~SPC q r~
;;
See also
https://emacs.stackexchange.com/a/53142
https://metaredux.com/posts/2019/12/09/dealing-with-expired-elpa-gpg-keys.html
It seems like the package gnu-elpa-keyring-update is not needed
}

@block{@block-name{debug / edebug}
System Crafters: Learning To Use the Emacs Debugger
https://youtu.be/LfwSc-lfFxM
Expand Down Expand Up @@ -59,6 +78,9 @@
}

@block{@block-name{Various}
;; check if FILENAME directory exists / is an existing directory
(file-directory-p FILENAME)

;; Copy and invoke a function?
(setq wrapped-copy (symbol-function 'emacs-version))
(fset 'fn (lambda () (funcall wrapped-copy)))
Expand Down
24 changes: 14 additions & 10 deletions notes/thgtoa.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -134,25 +134,29 @@
# 2020-06: https://www.victordodon.com/how-to-move-your-gpg-key-and-pass-store-to-a-different-computer/
# 1. Export public keys
# On to the DST_HOST where the keys need to be transfered, run:
# echo "Enter passphrase:" && read -s pass && echo $pass | ssh -t SRC_HOST \
# "gpg --export --passphrase-fd=0 --pinentry-mode=loopback | \
# gpg --import --batch --yes"
# #
# # 2. Export secret keys:
# echo "Enter passphrase:" && read -s pass && echo $pass | ssh -t SRC_HOST \
# "gpg --export-secret-keys --passphrase-fd=0 --pinentry-mode=loopback | \
# gpg --import --batch --yes"
set SRC_HOST <ip-address>
echo "Enter passphrase:" && read -s pass && echo $pass | ssh -t $SRC_HOST \
"gpg --export --passphrase-fd=0 --pinentry-mode=loopback | \
gpg --import --batch --yes"
#
# 2. Export secret keys:
set SRC_HOST <ip-address>
echo "Enter passphrase:" && read -s pass && echo $pass | ssh -t $SRC_HOST \
"gpg --export-secret-keys --passphrase-fd=0 --pinentry-mode=loopback | \
gpg --import --batch --yes"
# However:
gpg --list-keys
gpg --list-secret-keys
# show NOTHING!!!

# copy / transfer keys and ownertrust to a new machine / computer
set DST_HOST <ip-address>
gpg --armor --export-secret-keys > gpg--armor--export-secret-keys.gpg
gpg --armor --export > gpg--armor--export.gpg
gpg --export-ownertrust > gpg--ownertrust.gpg # plain text file
rsync gpg--ownertrust.gpg gpg--armor--export-secret-keys.gpg gpg--export.gpg DST_HOST:
shred --verbose --remove gpg--ownertrust.gpg gpg--armor--export-secret-keys.gpg gpg--export.gpg
rsync gpg--armor--export-secret-keys.gpg gpg--armor--export.gpg gpg--ownertrust.gpg $DST_HOST:
gpg --import --batch --yes gpg--armor--export-secret-keys.gpg gpg--armor--export.gpg gpg--ownertrust.gpg
shred --verbose --remove gpg--armor--export-secret-keys.gpg gpg--armor--export.gpg gpg--ownertrust.gpg

# gpg --export-ownertrust # see https://superuser.com/a/1125128
# It seems the trust level is corresponds to the number entered in the trust
Expand Down

0 comments on commit 97335dc

Please sign in to comment.