Fix GPG check randomly fails - #162
Conversation
|
I saw this error in a CI job I'm setting up and noticed that I can't work around it by importing the keys manually and using the --no-import-pgp-keys option, because it's not in the long opts list :( swiftly/install/swiftly-install.sh Line 352 in a7ef9e8 |
|
This should be fixed in the new swiftly that uses Swift NIO for the http transfer, more robust to 302 redirects. |
|
This should be fixed with the new swiftly 1.0.0 release due to the use of Swift NIO. |
|
#162 (comment) Is it right? It seems swiftly uses |
|
@sidepelican iirc the problem was resolved by changing the hostname for swift.org to www.swift.org, which yielded a payload that isn't gzip compressed, or at least one that the shared HTTPClient can process. Have you encountered any problems with Linux and gpg verifications since the swiftly 1.0.0 release? |
|
My local checking with curl, it seems that www.swift.org is still returning strange responses. In any case, since the implementation in this PR is outdated, I’ll close this. |
I may have made a mistake, so I will double-check. |
Problem
The install script randomly fails with an error like below.
Cause
Sometimes https://www.swift.org/keys/all-keys.asc returns a gzipped response, regardless of the request header's
Accept-Encoding.Pattern1
Pattern2(gzipped)
How to fix
Simply add the
--compressedoptions to the curl command.This option allows curl to handle gzipped bodies transparently.
Reference