How can I upload artifacts to nexus using linux command line? I am working on node.js, npm project? dist folder have been created using npm install and npm run build commands. But now I don’t know how to upload artifacts? Can someone explain this to me because I am new to these things.
I used this command,
curl --upload-file dist.tgz -v -u admin:zone@123 http://192.168.94.136:8081/repository/frontend_snap/hosted/zissa/dist.tgz
But I am getting error.
- About to connect() to 192.168.94.136 port 8081 (#0)
- Trying 192.168.94.136…
- Connected to 192.168.94.136 (192.168.94.136) port 8081 (#0)
- Server auth using Basic with user ‘admin’
PUT /repository/frontend_snap/hosted/zissa/dist.tgz HTTP/1.1
Authorization: Basic YWRtaW46em9uZUAxMjM=
User-Agent: curl/7.29.0
Host: 192.168.94.136:8081
Accept: /
Content-Length: 13786906
Expect: 100-continue
< HTTP/1.1 400 Bad Request
< Date: Wed, 31 Oct 2018 13:31:10 GMT
< Server: Nexus/3.14.0-04 (OSS)
< X-Content-Type-Options: nosniff
< Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation
< Connection: close
I have created npm(hosted) repository called frontend_snap