Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic maven username/password extraction from Gradle files #29938

Open
rarkins opened this issue Jun 29, 2024 Discussed in #29793 · 0 comments
Open

Automatic maven username/password extraction from Gradle files #29938

rarkins opened this issue Jun 29, 2024 Discussed in #29793 · 0 comments
Labels
manager:gradle Gradle package manager priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Jun 29, 2024

Discussed in #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:

dependencyResolutionManagement {
    repositories {
        //...
        maven("https://maven.pkg.github.com/<ORG>/<REPO>") {
            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:

hostRules: [
  {
    matchHost: "https://maven.pkg.github.com/<ORG>/<REPO>",
    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

@rarkins rarkins added type:feature Feature (new functionality) priority-4-low Low priority, unlikely to be done unless it becomes important to more people manager:gradle Gradle package manager labels Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manager:gradle Gradle package manager priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

1 participant