Fix GPG/pinentry settings for lazygit

This commit is contained in:
Ben Kreeger 2025-07-09 10:26:10 -05:00
parent 6d721d0013
commit 296bdd6fe5
Signed by: kreeger
GPG Key ID: D5CF8683D4BE4B50
7 changed files with 15 additions and 8 deletions

2
.gitignore vendored
View File

@ -8,3 +8,5 @@ gnupg/*
!gnupg/sshcontrol
zed/prompts/
lazygit/state.*

View File

@ -1,13 +1,11 @@
# https://github.com/drduh/config/blob/main/gpg-agent.conf
# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html
enable-ssh-support
ttyname $GPG_TTY
default-cache-ttl 60
max-cache-ttl 120
pinentry-program /usr/bin/pinentry-curses
#pinentry-program /usr/bin/pinentry-gnome3
#pinentry-program /usr/bin/pinentry-tty
#pinentry-program /usr/bin/pinentry-x11
#pinentry-program /usr/local/bin/pinentry-curses
# pinent-program /usr/local/bin/pinentry-mac
pinentry-program /usr/bin/pinentry-tty
pinentry-program /opt/homebrew/bin/pinentry-mac
allow-loopback-pinentry

View File

@ -68,3 +68,5 @@ throw-keyids
#list-options show-unusable-subkeys
# Verbose output
#verbose
# Password entry mode
pinentry-mode loopback

View File

@ -20,5 +20,5 @@ git:
args: --no-ff
mainBranches: [master, main, develop]
autoStageResolvedConflicts: false
overrideGpg: true
overrideGpg: false
parseEmoji: true

View File

@ -75,6 +75,9 @@ function update_dotfiles() {
nvim --headless "+Lazy! install" +qa > /dev/null 2>&1
nvim --headless "+Lazy! clean" +qa > /dev/null 2>&1
}
function edit_dotfiles() {
nvim ~/.config/dotfiles
}
# Tool functions
function vide() {

View File

@ -3,6 +3,9 @@
SCRIPTPATH=$HOME/.config/dotfiles/zsh
ZSH_CACHE_DIR="$HOME/.cache/zsh"
# Let GPG know which tty we're using
export GPG_TTY="$(tty)"
# google cloud sdk
if [[ -a "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc" ]]; then
source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"

View File

@ -8,7 +8,6 @@ export PATH=~/bin:$GOBIN:$PATH
export XDG_CONFIG_HOME=$HOME/.config
export TALOSCONFIG=$XDG_CONFIG_HOME/talos/config.yaml
export GNUPGHOME=$XDG_CONFIG_HOME/gnupg
export GPG_TTY="$(tty)"
export TERM=ansi
kubeconfig=(
$XDG_CONFIG_HOME/kube/k8s-dev.yaml