2

I have a Nexus raw-repository and want to download all files from a specific directory. I know the directory but not the names of the files in it. Nexus Version is 3.28.1-01.

With wget i'm able to download one specfic file, with knowing it's name:

wget --http-user="xy" --http-password="z" "https://nexus.oururl/repository/testraw/de/x/y/z/test.yaml"

But no attempt to get all files in this directory is working:

wget --http-user="xy" --http-password="z" -r -np "https://nexus.oururl/service/rest/repository/browse/testraw/de/x/y/z"

wget --http-user="xy" --http-password="z" -r -np "https://nexus.oururl/repository/testraw/de/x/y/z"

Both give 404.

Is there a solution?

Maik
  • 331
  • 2
  • 4
  • 12
  • Have you solved this problem? – Hazem Dec 24 '20 at 06:34
  • I am trying to download a folder from Nexus Raw Repository by this command curl -X GET -u user:pass https://nexus.example.com/repositor/text/2020_10_22/ -O but it doesn't work. It only works for one file. – Hazem Dec 24 '20 at 06:38
  • I did it with a curl, too. I think I used /* at the end and got all files in that folder, but not recursively for following folders. That worked for me, but I can only give you the sure answer in 2 weeks – Maik Dec 24 '20 at 10:58
  • Here's a good related answer that uses `wget` with a bunch of additional parameters that eventually also "kind of" worked for my raw repo: https://stackoverflow.com/a/65442746/4292075 However it should be noted that wget only acts like a typical web crawler in recursive mode, i.e. your success rates depends on how well your files are linked with each other, or can be at least listed. So it works good for a simple hosted web page with an index.html as a starting point, but probably won't work if you only have a bunch of arbitrary and unrelated files in a nested directory structure. – Till Kuhn Apr 28 '21 at 13:00

0 Answers0