Skip to content

Conversation

@adrien-piquerez-da
Copy link
Contributor

I'd like to be able to resolve artifacts from a public Google Artifact Registry, which does not require any authentication.

The current implementation always tries to load the credentials or fails with an IOException:

Your default credentials were not found. To set up Application Default Credentials for your environment, see https://cloud.google.com/docs/authentication/external/set-up-adc.

To fix this, googleCredentials can catch the IOException and return None instead.

object ArtifactRegistryUrlHandlerFactory {

private lazy val googleCredentials = {
private def googleCredentials(logger: Logger): Option[GoogleCredentials] = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to cache the GoogleCredentials here, it's already cached in DefaultsCredentialsProvider

@rolang rolang self-requested a review January 17, 2026 05:09
Copy link
Owner

@rolang rolang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @adrien-piquerez-da ! Looks good to me ✔️

@rolang rolang merged commit 5dec45c into rolang:master Jan 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants