Search code examples
nexusartifacts

Not able to upload using CURl in nexus 2


While executing the below command:-

--- curl -v -u admin:admin123 --upload-file "/f/docs/java/FileUploadApplet.jar" http://localhost:8081/nexus/File/FileUploadApplet.jar ---

Not able to upload the artifact, getting the below error:-

< HTTP/1.1 405 HTTP method PUT is not supported by this URL
< Date: Mon, 30 Jul 2018 12:49:49 GMT
< Server: Nexus/2.14.9-01
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< Content-Length: 0
* HTTP error before end of send, stop sending


Solution

  • Got the answer -

    curl -v -u admin:admin123 --upload-file /f/java/File.jar http://localhost:8081/nexus/content/repositories/releases/file/File.jar