The process '/usr/bin/gpg' failed with exit code 2
See original GitHub issueDescribe the bug
setup-swift
fails on ubuntu-latest
with The process '/usr/bin/gpg' failed with exit code 2
. This looks like #77 reappeared. Full logs can be found below.
Workflow configuration (please complete the following information):
- Platform (
runs-on
):ubuntu-latest
- Swift version (
swift-version
): any, see 5.0 as example in logs below.
Run fwal/setup-swift@v1.11.0
with:
swift-version: 5.0
/usr/bin/gpg --import /home/runner/work/_temp/6f3cd87a-c90d-48ae-a6a4-9509bc4160d0
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key D441C977412B37AD: public key "Swift Automatic Signing Key #1 <swift-infrastructure@swift.org>" imported
gpg: key 9F597F4D21A56D5F: public key "Swift 2.2 Release Signing Key <swift-infrastructure@swift.org>" imported
gpg: key 63BC1CFE91D306C6: public key "Swift 3.x Release Signing Key <swift-infrastructure@swift.org>" imported
gpg: key EF5430F071E1B235: public key "Swift 4.x Release Signing Key <swift-infrastructure@swift.org>" imported
gpg: key 7638F1FB2B2B08C4: public key "Swift Automatic Signing Key #2 <swift-infrastructure@swift.org>" imported
gpg: key 925CC1CCED3D1561: public key "Swift 5.x Release Signing Key <swift-infrastructure@swift.org>" imported
gpg: key FAF6989E1BC16FEA: public key "Swift Automatic Signing Key #3 <swift-infrastructure@swift.org>" imported
gpg: key 925CC1CCED3D1561: "Swift 5.x Release Signing Key <swift-infrastructure@swift.org>" 1 new signature
gpg: key F167DF1ACF9CE069: public key "Swift Automatic Signing Key #4 <swift-infrastructure@forums.swift.org>" imported
gpg: Total number processed: 9
gpg: imported: 8
gpg: new signatures: 1
/usr/bin/gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift
gpg: refreshing 8 keys from hkp://pool.sks-keyservers.net
gpg: keyserver refresh failed: No name
Warning: An error occurred when trying to refresh keys from hkp://pool.sks-keyservers.net: Error: The process '/usr/bin/gpg' failed with exit code 2
/usr/bin/gpg --keyserver ha.pool.sks-keyservers.net --refresh-keys Swift
gpg: refreshing 8 keys from hkp://ha.pool.sks-keyservers.net
gpg: keyserver refresh failed: No name
Warning: An error occurred when trying to refresh keys from ha.pool.sks-keyservers.net: Error: The process '/usr/bin/gpg' failed with exit code 2
/usr/bin/gpg --keyserver keyserver.ubuntu.com --refresh-keys Swift
gpg: refreshing 8 keys from hkp://keyserver.ubuntu.com
gpg: key F167DF1ACF9CE069: "Swift Automatic Signing Key #4 <swift-infrastructure@forums.swift.org>" not changed
gpg: key FAF6989E1BC16FEA: "Swift Automatic Signing Key #3 <swift-infrastructure@swift.org>" not changed
gpg: key 925CC1CCED3D1561: "Swift 5.x Release Signing Key <swift-infrastructure@swift.org>" not changed
gpg: key 7638F1FB2B2B08C4: "Swift Automatic Signing Key #2 <swift-infrastructure@swift.org>" not changed
gpg: key EF5430F071E1B235: "Swift 4.x Release Signing Key <swift-infrastructure@swift.org>" not changed
gpg: key 63BC1CFE91D306C6: "Swift 3.x Release Signing Key <swift-infrastructure@swift.org>" not changed
gpg: key 9F597F4D21A56D5F: "Swift 2.2 Release Signing Key <swift-infrastructure@swift.org>" not changed
gpg: key D441C977412B37AD: "Swift Automatic Signing Key #1 <swift-infrastructure@swift.org>" not changed
gpg: Total number processed: 8
gpg: unchanged: 8
/usr/bin/gpg --verify /home/runner/work/_temp/e10b5e90-937d-4a19-a17b-03c60e7bbdd5 /home/runner/work/_temp/7a6475e2-2771-4bf1-a368-ed6196ce9cd6
gpg: no valid OpenPGP data found.
gpg: the signature could not be verified.
Please remember that the signature file (.sig or .asc)
should be the first file given on the command line.
Error: Unexpected error, unable to continue. Please report at https://github.com/fwal/setup-swift/issues
The process '/usr/bin/gpg' failed with exit code 2
Stacktrace:
Error: The process '/usr/bin/gpg' failed with exit code 2
at ExecState._setResult (/home/runner/work/_actions/fwal/setup-swift/v1.11.0/dist/index.js:995:25)
at ExecState.CheckComplete (/home/runner/work/_actions/fwal/setup-swift/v1.11.0/dist/index.js:978:18)
at ChildProcess.<anonymous> (/home/runner/work/_actions/fwal/setup-swift/v1.11.0/dist/index.js:872:27)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:430:11)
at Socket.emit (events.js:210:5)
at Pipe.<anonymous> (net.js:659:12)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
GitHub Actions : How to resolve : "The process '/usr/bin/gpg ...
Someone know how we can fix this The process '/usr/bin/gpg' failed with exit code 2 for actions/setup-java@v3 ? java · maven · github-actions ......
Read more >exit status - What does gpg error code 2 ...
Largely used GPF codes are of three types : 0 is success (all other values indicate a failure). 2 is usually used for...
Read more >Failed to delete key · Issue #251 · actions/setup-java - GitHub
Removing private key from keychain Error: Failed to remove private key due to: The process '/usr/bin/gpg' failed with exit code 2 Cache hit...
Read more >Debugging "Make Failed with Exit Code 2" Error - CodeForGeek
The “Make Failed with Exit Code 2” error occurs during the node modules installation. We see lots of stack trace including the one...
Read more >running /usr/bin/gpg-agent failed (exitcode=2): general error ...
I spun up three Ubuntu 18 LTS VMs in Virtual Box. Connected the compute-node (master) to the other two compute-00 and compute-01. Linked...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Turns out this fails on Swift 4.2.x, 5.0.x, and 5.1.x, on ubuntu-latest. I don’t understand GPG enough to explain why these are the only ones that don’t work, but if you can figure out how to view the GitHub Actions log here: https://github.com/Samasaur1/SwiftIP/actions/runs/1804797343 it may be userful
Fix released in 1.12.0 👍🏻