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

The Gitlab provider does not support the parameter oauthScopes #1792

Open
mrumpf opened this issue Dec 13, 2024 · 1 comment
Open

The Gitlab provider does not support the parameter oauthScopes #1792

mrumpf opened this issue Dec 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@mrumpf
Copy link

mrumpf commented Dec 13, 2024

Feature description

The token scopes for the Gitlab provider are hard-coded in the source code: read_repository & write_repository.
I would like to use the token, created by GCM, also for Maven dependency resolution via the package registry API (in a Gradle Kotlin Script).
This is only possible if you request a token with the scopes "api" or "read_api".
Unfortunately the gitlab provider does not allow to override the scopes with the credential.oauthScopes property, defined by GCM.

The Scope parameter is read by GCM (TryGet "oauthScopes"), but not used when requesting the token. Therefore the token can only be used to perform Git operations.

@mrumpf mrumpf added the enhancement New feature or request label Dec 13, 2024
@mrumpf
Copy link
Author

mrumpf commented Dec 13, 2024

As a workaround, the list of hard-coded scopes could simply be extended by "read_api":

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant