-
Notifications
You must be signed in to change notification settings - Fork 43
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
not using available resolvers #108
Comments
Hello! How resolvers are specified in the |
for the build.sbt it is:
|
@poslegm then in the plugins.sbt it is:
|
Related issue: scalameta/scalafmt#1521 (comments may be helpful) What version of sbt do you use? |
@poslegm from build.properties it is |
And how do you pass credentials to sbt? |
@poslegm |
@poslegm we also set an environment variable: |
@BusyByte I'm not sure that I can shed any light on what's going wrong for you, but I can tell you the setup that we have that is working for us with our Artifactory server. I'm not sure that it should be necessary to set these values, but it works so I'm not touching it 😛. We are configuring the SBT
|
@ceedubs ok I'll review this and give it a shot and see if it resolves the issue. It may be a bit before I get back to you but I'll report back my results. |
@ceedubs adding COURSIER_CREDENTIALS and COURSIER_REPOSITORIES did not help. still seeing the unauthorized downloading the artifacts from artifactory. |
I'm not sure if I ran into the same issue or not, but I was having trouble resolving artifacts via Artifactory when scalafmt was running. I created a credentials file and set the Sbt version: 1.4.4 |
@BusyByte I spent two days debugging this and I figured out that to work with our Artifactory setup I had to add create
then you should be able to
if you are on Windows remember that you still need to provide |
This is an old issue but I'll post my findings anyway.
At work, we have a very constrained setup:
In our setup, the problem happens because
We used 1) and we pointed it to a file. At first, I tried pointing it to our
So eventually, we ended up with a second file: |
I have some suggestion on how to improve the situation:
|
I've just started seeing what could be very similar issue to this with scalafmt. We also resolve dependencies via This appears to break scalafmt:
The error message is very obscure, but definitely correlates with the use of And completely unexplained, this appears to affect my M1 macbook, but not my older intel chip. |
Hey so thanks to @daddykotex I was able to get everything working, but TBO I wasted 1 Day on this. Finding this on google is not super straightforward - If this issue doesn't get fixed, can we at least document it on the official page? :) |
@jaectec @daddykotex would you be willing to contribute a step-by-step process to achieve this? I'm a complete dummy both in sbt and coursier. the file to modify is |
I think #108 (comment) has already summed up perfectly. create that file and expose it through the environment variable But I think that this issue is probably better addressed in https://github.com/scalameta/scalafmt since it contains the downloader code - and maybe there is already something related: scalameta/scalafmt#3316? |
Documentation was added in scalameta/scalafmt#3621. |
Plugin version
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
When running scalafmtAll command:
Note: the above has been anonymized.
I talked to our infra team and they say that the scalafmt plugin is not using the available resolvers/creds so it's getting unauthorized and is the only plugin having this issue.
The text was updated successfully, but these errors were encountered: