Search code examples
nexus3

Cannot download asset in Sonatype Nexus Repository OSS


I have a self-hosted Nexus on Windows server and I want to do something as follows:

I uploaded a file, the_file.zip to a custom (file) blob, so-called the_blob, that links to the raw (hosted) repository, the_repo. Here is the result

enter image description here

I come the API Search and download asset: /v1/search/assets/download, with the curl configuration as follow

curl -X 'GET' \
  'http://localhost:8081/service/rest/v1/search/assets/download?repository=the_repo' \
  -H 'accept: application/json' \
  -H 'NX-ANTI-CSRF-TOKEN: 0.8617832718141006' \
  -H 'X-Nexus-UI: true'

Unfortunately, I got the error as follows:

enter image description here

What can I try next?


Solution

  • This is because of the invalid directory name, i.e. /C:/Users/foo/Downloads.

    Please use some "normal" directory name, for example, the_directory_name, or semantic version like 1.2.3