# Uploading Artifacts using shell commands

**URL:** <https://community.sonatype.com/t/uploading-artifacts-using-shell-commands/772>\
**Category:** Sonatype Nexus Repository\
**Created:** [November 6, 2018, 10:36am UTC](https://community.sonatype.com/t/uploading-artifacts-using-shell-commands/772 "2018-11-06T10:36:55Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![janithh92](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@janithh92](https://community.sonatype.com/u/janithh92)\
**Post date:** [November 6, 2018, 10:36am UTC](https://community.sonatype.com/t/uploading-artifacts-using-shell-commands/772/1 "2018-11-06T10:36:55Z")

</div>

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](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

---

_[View the full topic](https://community.sonatype.com/t/uploading-artifacts-using-shell-commands/772)._
