Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unlock the gpg-agent spawned by bash_profile #47

Closed
dkwo opened this issue Mar 17, 2023 · 1 comment
Closed

unlock the gpg-agent spawned by bash_profile #47

dkwo opened this issue Mar 17, 2023 · 1 comment

Comments

@dkwo
Copy link

dkwo commented Mar 17, 2023

is it possible to use this tool to unlock a gpg-agent that is exec'd by .bash_profile, as opposed to a long-lived one that survives log out?
(my use is that i have a runit service that checks mail with mbsync periodically.)

my bashrc contains

export GPG_TTY=$(tty)
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
	export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi

my bash_profile contains

[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -z $DISPLAY ] && [ "$(fgconsole)" -eq 1 ]; then
 exec gpg-agent --daemon river > ~/Projects/river.log 2>&1
fi

but I currently need to unlock gpg by hand (at first use, by pinentry).

Thanks.

@cruegge
Copy link
Owner

cruegge commented Mar 20, 2023

No, this is not possible. We simply send the login password to a running agent instance, and optionally start a new instance right away. There is no component that could stash the password for an agent that's started later.

@cruegge cruegge closed this as completed Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants