Make Forgejo asset upload resilient to schannel revocation-offline errors.
Some checks are pending
Release Windows / build (push) Waiting to run

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-10-08 21:11:54 +08:00
parent 7e78485396
commit 372138d9a1

View file

@ -112,7 +112,8 @@ function Upload-ForgejoAsset {
$url = "$apiBase/releases/$relId/assets" $url = "$apiBase/releases/$relId/assets"
$curl = Get-Command curl.exe -ErrorAction SilentlyContinue $curl = Get-Command curl.exe -ErrorAction SilentlyContinue
if (-not $curl) { throw "curl.exe required for asset upload" } if (-not $curl) { throw "curl.exe required for asset upload" }
& $curl.Source -f -sS -X POST ` # --ssl-no-revoke: schannel CRYPT_E_REVOCATION_OFFLINE often fails via proxy/offline CA.
& $curl.Source -f -sS --ssl-no-revoke -X POST `
-H "Authorization: token $Token" ` -H "Authorization: token $Token" `
-F "attachment=@$Path" ` -F "attachment=@$Path" `
$url $url