Skip to content

CoursierDependencyDownloader: support credentials - #4962

Merged
kitbellew merged 1 commit into
scalameta:mainfrom
kitbellew:4962
Sep 5, 2025
Merged

kitbellew merged 1 commit into
scalameta:mainfrom
kitbellew:4962

Conversation

@kitbellew

Copy link
Copy Markdown
Collaborator

This requires using the full coursier library as it loads credentials from COURSIER_CREDENTIALS env var, just like any default repositories have been loaded from COURSIER_REPOSITORIES.

This requires using the full coursier library as it loads credentials
from COURSIER_CREDENTIALS env var, just like any default repositories
have been loaded from COURSIER_REPOSITORIES.
@kitbellew kitbellew changed the title CoursierDependencyDownloaded: support credentials CoursierDependencyDownloader: support credentials Sep 4, 2025

@tgodzik tgodzik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Hopefully this helps or the other fallback I did

.addRepositories(repositories: _*)
.withDependencies(coursierDependencies: _*)
settings.fetch().asScala.map(_.toURI.toURL).toList
val fileCache = cache.FileCache() // this ctor preserves COURSIER_CREDENTIALS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Och, I wasn't aware of this being an option.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

the cache which default Fetch() ctor uses is defined as follows:

  lazy val default: Cache[Task] = FileCache()
    .noCredentials

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