我认为这发生在 github 从 githubusercontent idk 下载/重定向时试试这个
curl -LJO https://github.com/argoproj/argo-cd/releases/download/v2.0.1/argocd-util-linux-amd64
-L --location
-J --remote-header-name
-O --remote-name
如果你试试wget
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/120896210/9da49480-9e3b-
11eb-9e9b-706ed4210355?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-
Credential=AKIAIWNJYAX4CSVEH53A%2F20210423%2Fus-east-1%2Fs3%2Faws4_request&X-
Amz-Date=20210423T145336Z&X-Amz-Expires=300&X-Amz-
Signature=dc9310ece835c05901c4a051735560c9445c7ba34008e5404516f609c5d490a9&X-
Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=120896210&response-content-
disposition=attachment%3B%20filename%3Dargocd-util-linux-amd64&response-content-
type=application%2Foctet-stream [following]
--2021-04-23 16:53:36-- https://github-
releases.githubusercontent.com/120896210/9da49480-9e3b-11eb-9e9b-706ed4210355?X-
Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-
Credential=AKIAIWNJYAX4CSVEH53A%2F20210423%2Fus-east-1%2Fs3%2Faws4_request&X-
Amz-Date=20210423T145336Z&X-Amz-Expires=300&X-Amz-
Signature=dc9310ece835c05901c4a051735560c9445c7ba34008e5404516f609c5d490a9&X-
Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=120896210&response-content-
disposition=attachment%3B%20filename%3Dargocd-util-linux-amd64&response-content-
type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-
releases.githubusercontent.com)... 185.199.109.154, 185.199.110.154,
185.199.108.154, ...
Connecting to github-releases.githubusercontent.com (github-
releases.githubusercontent.com)|185.199.109.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 89473879 (85M) [application/octet-stream]
Saving to: ‘argocd-util-linux-amd64’
它遵循我猜最后一个的链接。
参考:https ://gist.github.com/jwebcat/5122366