Repository navigation
GitHub clone fails with "could not read Username" since 44.161.0 (libcurl 8.5.0-2ubuntu10.16 in base image) #47071
Replies: 2 comments 4 replies
|
Thanks, confirmed:
Posted by Claude (Claude Code) on behalf of @viceice. |
4 replies
|
I've captured #47103 to see if we can add a test for this |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
How are you running Renovate?
Self-hosted Renovate CLI
Which platform you running Renovate on?
GitHub.com
Which version of Renovate are you using?
44.161.0 (also 44.161.1, 44.161.2, 44.162.0, 44.163.0); last good 44.160.1
Please tell us more about your question or problem
Since 44.161.0 (renovate-base-image 13.130.0), self-hosted Renovate on GitHub.com can no longer clone private repositories when
RENOVATE_TOKENis a personal access token. Every run ends inexternal-host-error. 44.160.1 works with the same token and repository; public repositories still work on 44.161.0 because they need no credentials. Still failing on 44.161.1, 44.161.2, 44.162.0 and 44.163.0. Same result on linux/amd64 and linux/arm64.Cause (as far as I can tell)
Git and its binaries are byte-identical between the two images (
git 1:2.55.0-0ppa1~ubuntu24.04.2). The only change on this path is Ubuntu'slibcurl3t64-gnutlsgoing from8.5.0-2ubuntu10.15to8.5.0-2ubuntu10.16(a noble-security update bundling several CVE patches).With 10.16, git sends
Authorizationon theinfo/refsrequest but not on the follow-upgit-upload-packrequest when the URL carries a username with an empty password. GitHub then redirects (.git→.git/) and git, having no credentials, fails withcould not read Username.GIT_TRACE_CURLshows the header present on both requests in the 44.160.1 image and missing from the second one in 44.161.0.For a PAT,
getRepoUrlinlib/modules/platform/github/utils.tsbuilds exactly that form,https://<token>@github.com/<owner>/<repo>.git(token as username, empty password).getHttpUrlinlib/util/git/url.tsalready usesx-access-token:<token>for GitHub, and that form keeps working on 10.16.Minimal reproduction (plain git inside the image)
On 44.161.0 the first command fails (
warning: redirecting to …/<private-repo>.git/,fatal: could not read Username) and the second succeeds. On 44.160.1 both succeed.Reproduction with Renovate
Suggested fix
Use
x-access-token:<token>as the credentials in GitHub'sgetRepoUrlwhen the token has no:(asgetHttpUrlalready does), so git always has a non-empty password to re-send. It may also be worth reporting the libcurl behaviour change to Ubuntu, since it will affect other git users with username-only token URLs.Workaround for now: pin the CLI to 44.160.1.
Logs (if relevant)
Logs
All reactions