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

Error when attempting to create certify key #474

Open
PavlovicAndrej opened this issue Feb 3, 2025 · 1 comment
Open

Error when attempting to create certify key #474

PavlovicAndrej opened this issue Feb 3, 2025 · 1 comment

Comments

@PavlovicAndrej
Copy link

Hey, I noticed that using mktemp -d -t gnupg-$(date +%Y-%m-%d)-XXXXXXXXXX on macOS can create long socket paths, causing gpg-agent errors.

Generate the Certify key:

echo "$CERTIFY_PASS" | gpg --batch --passphrase-fd 0 \
    --quick-generate-key "$IDENTITY" "$KEY_TYPE" cert never

This crashed my gpg-agent. I tried to run daemon manually:

$ gpg-agent --daemon
gpg-agent[18057]: socket name '/var/folders/wm/5cgv84qj2qx_prnfw3h12prh0000gn/T/gnupg-2025-02-03-XXXXXXXXXX.gEpsSuD8aY/S.gpg-agent.extra' is too long

I managed to fix that by recreating temporary directory like:

mktemp -d -t gpg-temp

Which lowered char count from 105 to 68.

@drduh
Copy link
Owner

drduh commented Mar 3, 2025

Interesting find. Does anyone know the maximum character limit? We can probably simplify the temp dir name regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants