-
Notifications
You must be signed in to change notification settings - Fork 324
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
Analyzer fails to authenticate with Artifactory when downloading artifacts (http-401) #5507
Comments
Are you using exactly the same URL as the ORT analyzer for this check? Because I recall there was a subtle difference in URLs that artifactory shows, which sometimes contain "api" as part of the path, and sometimes not. An IIRC in one of the cases the user's API key instead of e.g. an AD password needs to be used. Maybe @MarcelBochtler remembers some more details. |
Yes, the download link shown in Artifactory's native file browser matches the one used by ORT. I tried both username / token and username / API key in the settings.xml. |
I did some more investigation and found out, that the download requests performed by ORT do not reach Artifactory at all. |
Could be. Looks like this is more or less a know issue with the Apache HTTP client that the Maven resolver uses. The answer on SO has a solution on how to fix this for the Apache HTTP client directly, but we'd yet need to find out how to fix this for the Maven resolver / the client that the resolver uses. |
Meanwhile we tried some configuration on the loadbalancer. But without effect. The credentials used for these type of downloads (executed by MavenSupport class) are taken either from Requests on Artifactory side look like
Is there any way to add a custom request header to these requests? Might be worth a try. |
Might our issues be related to this? Because we are only having authentication errors with Gradle builds. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@software-testing-professional Unfortunately, you didn't use a permalink, and by now that line points to |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@sschuberth Sorry for that.
This led me to the assumption that something related to authentication might still be missing. |
No worries. Thanks for being quick in posting an update!
I'm currently unsure whether this old comment of @mnonnenmacher from 2017 is still valid. @software-testing-professional looks like you're running ORT from a Docker image. Could you also try running ORT natively with the same configuration to rule out any Docker-related issues? |
@sschuberth Sorry, I'm a bit late with my answer. ;-) The repository configuration is done via Gradle.
Although everything was configured, Artifactory only got requests from an "unauthenticated" user. But:
So currently the Gradle authentication still does not work. But solved via proxy authentication. |
@software-testing-professional would you mind checking whether the current version of ORT that includes #6498 fixes the issue for you? |
@sschuberth Yes, I'll be able to try that next week from Wednesday on. 👍 |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hmm, this sounds a bit as if you're confusing this issue with #4540 😉 But what about this:
|
Ah right - that happens if you have too many open tabs. 😆 Regarding authentication, this also works with the Docker-based ORT built from commit 19c89ff. |
Great, thanks for confirming, so I'll be closing this! |
Hi there,
I'm having trouble to authenticate against Artifactory when running
ort analyze
.Credendials for Artifactory (username / password) are provided via
.netrc
file and Mavensettings.xml
.But download attempts always result in a http-401 unauthorized.
Downloading these artifacts via cURL works fine, when I provide username / password.
So it seems that the configuration on Artifactory side is fine.
Did I miss some configuration? What can I do to solve this issue?
I appreciate your help! :-)
(i) Some information like URLs and header information have been obfuscated with
***
The text was updated successfully, but these errors were encountered: