renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
16.47k stars 2.11k forks source link

Automatic maven username/password extraction from Gradle files #29938

Open rarkins opened 2 days ago

rarkins commented 2 days ago

Discussed in https://github.com/renovatebot/renovate/discussions/29793

Originally posted by **ferinagy** June 21, 2024 ### What would you like help with? I would like help with my configuration ### How are you running Renovate? Self-hosted ### If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate. Github action - 40.1.12 ### Please tell us more about your question or problem We have a gradle project that uses a private maven repository with given credentials to resolve some dependencies: ```kotlin dependencyResolutionManagement { repositories { //... maven("https://maven.pkg.github.com//") { credentials { username = "..." password = "..." } } } } ``` Renovate correctly picks up the host and tries to use it to resolve dependencies, but it does not seem to pick up the credentials, as the resolution fails. When adding a host rule, it works: ```json5 hostRules: [ { matchHost: "https://maven.pkg.github.com//", hostType: "maven", username: "...", password: "..." }, ] ``` However, this feels like unnecessary duplication. Would it be possible for Renovate to pick up the credentials from the gradle file? ### Logs (if relevant)
Logs ``` Replace this text with your logs, between the starting and ending triple backticks ```