From acf2bc5bce3008673b93f42b654ec919de52b253 Mon Sep 17 00:00:00 2001 From: Florian Ruppel Date: Mon, 20 Jul 2026 13:38:30 +0200 Subject: [PATCH] Fix dependency clone auth header for long tokens Root cause of the intermittent 'Failed sending HTTP request' errors since 2026-07-18: GitHub is rolling out a new, ~390-char token format (ghs_..._, "ver":3). The clone loop builds the auth header via 'echo -n "x-access-token:${token}" | base64', and GNU base64 wraps its output at 76 chars. With the new token format the header value therefore contains embedded newlines, which libcurl rejects before sending the request. This explains all observed symptoms: - intermittent (only jobs that received a new-format token failed) - instant failure (~60ms, before any transfer) - all in-job retries failed (same token within a job) - only the dependency clone affected (actions/checkout encodes via JS Buffer, which never wraps) Reproduced locally: a wrapped base64 header makes git clone fail immediately with a libcurl header error. Use base64 -w0, matching downstream/action.yml which already does this correctly. --- setup-extension/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-extension/action.yml b/setup-extension/action.yml index 8464e60..4523f58 100644 --- a/setup-extension/action.yml +++ b/setup-extension/action.yml @@ -233,7 +233,7 @@ runs: dep_token=$(echo "$dep" | jq -r '.token // empty') if [ -n "${dep_token}" ]; then # if a custom token is provided use this token to clone - git config --global "http.${dep_repo}/.extraheader" "AUTHORIZATION: basic $(echo -n "x-access-token:${dep_token}" | base64)" + git config --global "http.${dep_repo}/.extraheader" "AUTHORIZATION: basic $(echo -n "x-access-token:${dep_token}" | base64 -w0)" export GH_TOKEN="${dep_token}" fi