Git basic auth fails for Kerberos-enabled GitLab #36009
Replies: 2 comments 1 reply
-
|
Hi there, The maintainers have labeled this discussion as a use case specific to "enterprise" users. Enterprise users typically self-host Renovate and have advanced requirements like custom certificates, HTTP proxies, private registries, air gapping, etc. Such cases usually need a lot of back-and-forth to resolve, because the problem is related to the user's environment. Usually the user's environment can not be reproduced publicly, which means that maintainer debugging is not possible. The maintainers decided their time is best spent on issues that help large numbers of users. This means enterprise-specific issues affecting one user (or a small number of users), are not a priority. If we can help you quickly, we will. But if you see this message, then a maintainer believes this is not a quick fix. The maintainers will not actively work on this issue, unless new information is found. If you are an enterprise user, please consider the following options:
If you choose to wait, then this discussion can remain open indefinitely. But please be patient, do not nudge or bump this discussion just to get attention. Thanks, the Renovate team |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
GitLab
Please tell us more about your question or problem
We're running self-hosted GitLab with Kerberos authentication enabled. When Renovate attempts to access a repository, the authentication with a Personal Access Token (PAT) always fails:
{ "name": "renovate", "level": 50, "logContext": "jde7l1hyDEEboidEwp5kq", "repository": "infrastructure/my/project", "err": { "task": { "commands": [ "ls-remote", "--heads", "https://**redacted**@git.int.company.com/infrastructure/my/project.git" ], "format": "utf-8", "parser": "[function]" }, "message": "remote: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See https://git.int.company.com/help/topics/git/troubleshooting_git.md#error-on-git-fetch-http-basic-access-denied\nfatal: Authentication failed for 'https://git.int.company.com/infrastructure/my/project.git/'\n", "stack": "Error: remote: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See https://**redacted**@3.27.0/node_modules/simple-git/src/lib/plugins/error-detection.plugin.ts:42:29)\n at PluginStore.exec (/usr/local/renovate/node_modules/.pnpm/simple-git@3.27.0/node_modules/simple-git/src/lib/plugins/plugin-store.ts:54:29)\n at /usr/local/renovate/node_modules/.pnpm/simple-git@3.27.0/node_modules/simple-git/src/lib/runners/git-executor-chain.ts:124:42\n at new Promise (<anonymous>)\n at GitExecutorChain.handleTaskData (/usr/local/renovate/node_modules/.pnpm/simple-git@3.27.0/node_modules/simple-git/src/lib/runners/git-executor-chain.ts:121:14)\n at GitExecutorChain.<anonymous> (/usr/local/renovate/node_modules/.pnpm/simple-git@3.27.0/node_modules/simple-git/src/lib/runners/git-executor-chain.ts:97:40)\n at Generator.next (<anonymous>)\n at fulfilled (/usr/local/renovate/node_modules/.pnpm/simple-git@3.27.0/node_modules/simple-git/dist/cjs/index.js:52:24)\n at processTicksAndRejections (node:internal/process/task_queues:105:5)" }, "msg": "Repository has unknown error" }The reason is a well-known and long-standing issue in Git and its underlying libcurl, which the GitLab documentation further explains:
Git shows this behavior only if the URL contains the credentials, but it works without issues when it prompts for the password.
Cross-checking against a GitLab test instance that does not have Kerberos enabled confirms there are no other issues involved.
A workaround is to configure Git to use the credentials store, and create a
~/.git-credentialsfile. Git (e.g.,git ls-remote --heads git.int.company.com/infrastructure/my/project.git) then works as expected.How can I make Renovate work with Kerberos-enabled GitLab? Configuring a dedicated TCP port for Kerberos authentication (as mentioned in the GitLab docs) is not an option.
Logs (if relevant)
No response
Beta Was this translation helpful? Give feedback.
All reactions