actions/setup-java@v6 creates its temporary gpg home as ${RUNNER_TEMP}/verify-signature-gpg-home-XXXXXX. On a self-hosted macOS runner whose work folder is longer than the hosted runners' /Users/runner/work, gpg-agent's socket S.gpg-agent.browser inside that home exceeds macOS's 104-byte sun_path limit. gpg then prints can't connect to the gpg-agent: IPC connect call failed and exits 2 on --import even though the key imported, and the action reports "Failed to verify signature for Temurin version …: The process 'gpg' failed with exit code 2".
Reproduced on two Apple Silicon macs (GnuPG 2.5.20 and 2.5.21, v6.0.0 at dd06d9c): with an 84-character gpg home the import fails; with an 81-character home the same command succeeds. Moving the runner's work folder to a short path (~/gh-runner) fixes it.
Suggested fix: create the gpg home under os.tmpdir() (short on macOS) instead of RUNNER_TEMP, or fail early with a clear message when the resulting socket path would exceed the limit. The warning-only default from #1262 hides this instead of fixing it.
Reactions are currently unavailable
actions/setup-java@v6 creates its temporary gpg home as ${RUNNER_TEMP}/verify-signature-gpg-home-XXXXXX. On a self-hosted macOS runner whose work folder is longer than the hosted runners' /Users/runner/work, gpg-agent's socket S.gpg-agent.browser inside that home exceeds macOS's 104-byte sun_path limit. gpg then prints can't connect to the gpg-agent: IPC connect call failed and exits 2 on --import even though the key imported, and the action reports "Failed to verify signature for Temurin version …: The process 'gpg' failed with exit code 2".
Reproduced on two Apple Silicon macs (GnuPG 2.5.20 and 2.5.21, v6.0.0 at dd06d9c): with an 84-character gpg home the import fails; with an 81-character home the same command succeeds. Moving the runner's work folder to a short path (~/gh-runner) fixes it.
Suggested fix: create the gpg home under os.tmpdir() (short on macOS) instead of RUNNER_TEMP, or fail early with a clear message when the resulting socket path would exceed the limit. The warning-only default from #1262 hides this instead of fixing it.