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

Add option to provide credentials for custom repositories #3200

Open
ghostbuster91 opened this issue Sep 23, 2024 · 1 comment
Open

Add option to provide credentials for custom repositories #3200

ghostbuster91 opened this issue Sep 23, 2024 · 1 comment
Labels
config Issues tied to the config sub-command. enhancement New feature or request UX

Comments

@ghostbuster91
Copy link
Contributor

ghostbuster91 commented Sep 23, 2024

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

@ghostbuster91 ghostbuster91 added the enhancement New feature or request label Sep 23, 2024
@Gedochao Gedochao added the UX label Sep 24, 2024
@ghostbuster91
Copy link
Contributor Author

Maybe it would just make sense to support arbitrary configuration passed inline?

@Gedochao Gedochao added the config Issues tied to the config sub-command. label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Issues tied to the config sub-command. enhancement New feature or request UX
Projects
None yet
Development

No branches or pull requests

2 participants