Skip to content

Add option to provide credentials for custom repositories #3200

Open
@ghostbuster91

Description

@ghostbuster91

Is your feature request related to a problem? Please describe.

When configuring publishing one can provide --password and --user options to configure credentials. However there is no such option in scala-cli when configuring credentials for custom repositories.

Describe the solution you'd like
A new cli option that could be use for that, similar to what we have for configuring publishing credentials.
e.g.

scala-cli --repository-credentials "$HOST" env:USER env:TOKEN

Describe alternatives you've considered
Currently this can be done in one of the following ways:

  1. setting COURSIER_CREDENTIALS="$HOST $USER:$TOKEN" environment variable when calling scala-cli
  2. passing -Dcoursier.credentials="$HOST $USER:$TOKEN" java property when calling scala-cli
  3. calling scala-cli --power config repositories.credentials $HOST env:USER env:TOKEN beforehand

1. and 2. have the downside that credentials are passed as a clear text and could be leaked if not masked
3. seems counter-intuitive when invoking in a CI environment as we don't want to mess with global state

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXconfigIssues tied to the config sub-command.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions