oss-review-toolkit / ort

A suite of tools to automate software compliance checks.
https://oss-review-toolkit.org
Apache License 2.0
1.6k stars 309 forks source link

Maven private repository #7940

Open remi-cogito opened 11 months ago

remi-cogito commented 11 months ago

How to set up docker image to authenticate with private maven repository?

sschuberth commented 11 months ago

Please see https://oss-review-toolkit.org/ort/docs/guides/docker#authenticating-with-a-private-git-repository-fails which describes the solution based on a .netrc file. You basically need the same, but with a Maven settings.xml file mounted to ~/.m2/settings.xml inside the container.

BinchenQ commented 10 months ago

I have tried with /home/ort/.m2/settings.xml and ~/.m2/settings.xmland /root/.m2/settings.xml, it did not work.

status code: 401, reason phrase:  (401) and 'parent.relativePath' points at no local POM @ line 19, column 13

I could run mvn clean package successfully in this container, but ort analyze failed. Any dependency in private jfrog could not be downloaded.

arunsmartarrow commented 8 months ago

I am also facing the same issue as described by @BinchenQ.

@sschuberth: Can you please advise here, thanks

sschuberth commented 8 months ago

status code: 401, reason phrase: (401) and 'parent.relativePath' points at no local POM @ line 19, column 13

In this specific case from @BinchenQ it seems like the parent POM is hosted elsewhere, like another host, which might require different authentication than the primary project under analysis. Hard to say without more details...

MNesche commented 2 months ago

Hi, in my case, running ORT locally, only the solution with .gitconfig worked for private repositories. The .netrc file is recognized when running with --debug, but the request leads always to "Not Authorized". Maybe you could give that a try.