LukeSmithxyz / voidrice

My dotfiles (deployed by LARBS)
GNU General Public License v3.0
4.28k stars 1.21k forks source link

can't sign gpg keys .. I'm interested in your pam.d setup #1015

Closed kronikpillow closed 3 years ago

kronikpillow commented 3 years ago

so, ever since i moved from Arch to Artix, i'v been having trouble signing commits with gpg until I run mw -Y, which seems to fix the issue after running it, althou I'v decided to try out suite66 instead of runit, as suite66 seems superior in many ways

it's as if my gpg keys are not unlocked upon login, but are unlocked as soon as i run mw -Y, I am using pam-gnupg to unlock my gpg keys on login apart from that i am also using gnome-keyring althou I am not entirely sure if i'm supposed to use it or not as I do not see it anywhere in your .zprofile or xinitrc, but removing it from pam doesn't make any difference to the issue ... still, gnome-keyring is installed by default in LARBS, and it's confusing me how exactly you have your gnupg setup, and if your using gnome-keyring or not

here is my /etc/pam.d/login

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
auth       optional     pam_gnome_keyring.so
account    include      system-local-login
session    include      system-local-login
password   include      system-local-login
session    optional     pam_gnome_keyring.so auto_start

here is my /etc/pam.d/system-local-login

auth      include   system-login
account   include   system-login
password  include   system-login
session   include   system-login
auth     optional  pam_gnupg.so store-only
session  optional  pam_gnupg.so
#password   required    pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
#password   required    pam_unix.so sha512 shadow use_authtok
password    required    pam_unix.so sha512 shadow nullok
password    optional    pam_gnome_keyring.so

here is my ~/.gnupg/gpg-agent.conf

pinentry-program /usr/bin/pinentry-gnome3
allow-preset-passphrase
max-cache-ttl 86400

here is my ~/.gitconfig (except that i replaced my email with xxxx ,and signing key with xxxxx as I am not entirely sure if it's safe to show it publicly)

[user]
    email = kronikpillow@xxxxxxxxxx
    name = KronikPillow
    signingkey = XXXXXXXXXXXXXX
[credential]
    helper = /usr/lib/git-core/git-credential-libsecret
[hub]
    protocol = ssh
[commit]
    gpgsign = true

in my ~/.config/pam-gnupg I have used the keygrip of the subkey with the [E] flag after using gpg -K --with-keygrip to get the keygrip

this is my xinitrc

#!/bin/sh
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then
    . "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile"
else
    . "$HOME/.xprofile"
fi

ssh-agent dwm

this is my xprofile

#!/bin/sh
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources  # Uncomment to use Xresources colors/settings on startup
eval $(gnome-keyring-daemon --start)
polkit-gnome &      # start a policy kit agent
setbg &         # set the background with the `setbg` script
remaps &        # run the remaps script, switching caps/esc and more; check it for more info
xcompmgr &      # xcompmgr for transparency
dunst &         # dunst for notifications
unclutter &     # Remove mouse when idle

after i reboot and login, if i try to do a commit i get a

g commit -am "test"
error: gpg failed to sign the data
fatal: failed to write commit object

but as soon as i run mutt wizard sync (luke smith's mutt wizard) mw -Y email syncs, and after that, I can make commits with git and they get signed with no issue ... I am confused as to why this is happening, this exact same setup on Arch works perfectly without the above issues

would you be so kind to explain your exact setup luke? if your using gnome-keyring? and if not, why is it installed in the first place?

jemadux commented 3 years ago

πŸ‘€πŸ‘€πŸ‘€ following