Authentication to private repository using SBT credentials not working
See original GitHub issueI have SBT credentials installed in ~/.sbt/0.13/plugins/credentials.sbt
in the form:
credentials += Credentials("Sonatype Nexus Repository Manager",
"nexus.example.com",
"user",
"pass")
SBT resolves private artifacts from my company’s Nexus just fine. I switched to Coursier (added addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M14")
to my plugin definitions), and I added the line
coursierUseSbtCredentials := true
as suggested by the documentation this should use the SBT credentials, but when resolving I always get
[error] unauthorized: https://nexus.example.com....
Is there something I’m missing? Thanks
Issue Analytics
- State:
- Created 7 years ago
- Reactions:12
- Comments:21 (3 by maintainers)
Top Results From Across the Web
SBT is unable to find credentials when attempting to download ...
For authenticating dependency artifact retrieval, create a file like %USERPROFILE%/.sbt/0.13/plugins/my-credentials.sbt with a credentials ...
Read more >sbt Repository - Cloudsmith Help
sbt /.credentials file (required for private repositories if using HTTP Basic Authentication), all that is left is to specify the dependency in the...
Read more >Add support for SBT authentication (#11273) · Issues - GitLab
The documentation appears to state that the only acceptable form of authentication is with a username and password. My team is dealing with...
Read more >sbt Reference Manual — Publishing
To use publishing, you need to specify the repository to publish to and the credentials to use. Once these are set up, you...
Read more >sbt-github-packages - Scaladex
Please, for the love of all that is holy, do not check this into your repository if you hard-code your credentials in this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ended up not using
coursierUseSbtCredentials
. Instead I set credentials to every resolver via thecoursierCredentials
key.Ran into the same issue and tried using
coursierUseSbtCredentials
but that ended up with a bunch ofcoursier.ResolutionException: 6 locked
exceptions.So I ended up specifying credentials specifically for coursier in my
~/.sbt/0.13/global.sbt
like so:You can list out all the names of the resolvers used in your build by running: