-
Notifications
You must be signed in to change notification settings - Fork 937
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
[1.3.0] Nexus repo credentials not used when downloading dependencies/custom plugin #4852
Comments
@francisdb Thanks for the report. I think it's a duplicate of #4802 |
@eed3si9n Since #4802 is closed but this issue is still there. I would like to see this re-opened. Projects that work on 1.2.x (even without coursier 1.2.x) give unauthorized on 1.3.0-RC3 when downloading sbt plugin dependencies from nexus. This could be related to #4932, however it's not very likely as I see sbt trying do download from our nexus, just not using the correct credentials Could also be related to coursier/coursier#1319 |
@sbrunk can you confirm this? Anything special about your setup? |
In #4855 I added a task called |
@francisdb I can confirm that downloading of a custom sbt plugin fails in the same way you've described above. When adding the plugin manually to the coursier cache, downloading normal dependencies in the main build works fine in my case though.
|
Looks like downloading normal dependencies works now after clearing the cache So that indeed only leaves the downloading of custom sbt plugins failing on sbt startup, are the credentials registered at a later time? |
Another datapoint for this under sbt1.3.0-RC3, though I think it merely confirms what has already been said here. I have an Removing the plugin directive allows it to continue (under |
should this be on the 1.3 milestone? |
@SethTisue I don't think it's a blocker to ship next RC4. |
Just a small remark, I guess this can be used for testing these issues: https://github.com/features/package-registry (free for now) Also confirming that this is still broken in |
It would be an awesome contribution if you or someone else could come up with a public repro :) |
I'll have a look if I can come up with something but looks like I will have to wait for access
|
I've been testing sbt 1.3.0-RCs with Bintray's private repo that requires authentication, and it works fine, so maybe we need actual Nexus for testing. |
Setting up a Nexus with docker is quite trivial, might have a go at that
|
I set up a nexus and a test project, see the instructions there https://github.com/francisdb/sbt-plugin-test something is fishy though,
moved this issue to #4984, somehow that issue was fixed by removing the target folder, now I see the unauthorized resolution failure on
|
@eed3si9n have you been able to reproduce the issue using my private nexus mentioned above? |
Yes, I get the unauthorized. I am guessing this is an upstream Coursier issue? coursier/coursier#1319
|
Seems like the above is not correct, I thought having seen that in previous testing though 😕 |
Workaround Add this in ThisBuild / useCoursier := false |
Do we have any workaround that allows to keep using coursier? Like specifying credentials in some specific way? |
@Krever a pull request that fixes this on the coursier side has been submitted at so might be fixed soon in |
@Krever: If you have a proxy that sits in front of nexus and can have it rewrite the I don't have the energy to do that today. We're using nginx, so I think we could simply (conditional on the presence of a first header) add a second |
I have the same issue using 1.3.3. I've reverted to 1.2.8 and problem has gone. Was it actually fixed? |
what exact issue do you have, for us all issues have been fixed in 1.3.1 |
Hi, I opened a new bug report for it with full description in #5200 |
This doesn't work for me. Does the setup require more than this?
I still get |
@bomgar The credentials need the correct realm: If I remember correctly sbt 1.3.3 gives a warning about this during the build. |
Thanks that works. Is this documented anywhere? |
Looks like indeed the docs are a bit lacking here |
To generalize on what @francisdb mentioned about the credentials' realm for any other repository:
I hope this is added to the documentation page so that people don't have to scour the web searching for this closed issue to find the answer to this rather common situation. |
I'm having this issue still. Has it been fixed (private Artifactory)? |
(issue exists since sbt
1.3.0-RC1
)switching from sbt 1.2.8 with sbt-coursier 1.0.2 to sbt 1.3.0 without sbt-coursier plugin
We have a custom sbt plugin that fails to download from nexus:
plugins.sbt
Same problem if credentials are added in
~/.sbt/1.0/global.sbt
Same problem happens with normal dependencies (not sbt plugins)
Same problem happens when using sbt 1.2.x with sbt-coursier 2.0.0-RC3-2
Is there a way to show what credentials sbt is using to go to that nexus?
workaround
Add this in
plugins.sbt
(meta buid) andbuild.sbt
The text was updated successfully, but these errors were encountered: