# Can't upload a large DEB package to Nexus

**URL:** <https://community.sonatype.com/t/cant-upload-a-large-deb-package-to-nexus/9099>\
**Category:** Sonatype Nexus Repository\
**Tags:** nexus-repository\
**Created:** [August 10, 2022, 3:17pm UTC](https://community.sonatype.com/t/cant-upload-a-large-deb-package-to-nexus/9099 "2022-08-10T15:17:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![grubjack](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@grubjack](https://community.sonatype.com/u/grubjack)\
**Post date:** [August 10, 2022, 3:17pm UTC](https://community.sonatype.com/t/cant-upload-a-large-deb-package-to-nexus/9099/1 "2022-08-10T15:17:39Z")

</div>

Hi guys,

Nexus version: 3.41.0-01

Can’t upload a large deb package to the Nexus APT repository using curl

`curl -u "admin:admin" -H "Content-Type: multipart/form-data" --data-binary "@./my.deb" https://.../repository/deb-repo/`

> curl: option --data-binary: out of memory

Second method:

`curl -u "admin:admin" --upload-file "my.deb" -X PUT https://.../repository/deb-repo/`

> Expect: 100-continue
> 
> TLSv1.2 (IN), TLS header, Supplemental data (23):  
> Mark bundle as not supporting multiuse  
> HTTP/1.1 405 PUT  
> Strict-Transport-Security: max-age=7776000  
> Server: Nexus/3.41.0-01 (OSS)  
> X-Content-Type-Options: nosniff  
> Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation  
> X-XSS-Protection: 1; mode=block  
> Allow: GET,HEAD,POST  
> Connection: close

`curl -u "admin:admin" --upload-file "my.deb" -X POST https://.../repository/deb-repo/`

> …  
> Method Not Allowed  
> …

Thanks in advance

---

<div class="post-metadata">

**Author:** ![anthony.ribot](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@anthony.ribot](https://community.sonatype.com/u/anthony.ribot)\
**Post date:** [April 20, 2023, 7:58am UTC](https://community.sonatype.com/t/cant-upload-a-large-deb-package-to-nexus/9099/2 "2023-04-20T07:58:59Z")

</div>

Hi,

Did you find a solution? I have the same problem with 3.51.0-01.

Regards

---

<div class="post-metadata">

**Author:** ![anthony.ribot](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@anthony.ribot](https://community.sonatype.com/u/anthony.ribot)\
**Post date:** [April 20, 2023, 3:25pm UTC](https://community.sonatype.com/t/cant-upload-a-large-deb-package-to-nexus/9099/3 "2023-04-20T15:25:28Z")

</div>

After hours of research, I found a solution. I’m posting here if it can help anyone else.

Use this command:

```bash
curl -u "<user>:<password>" -fail -X POST "http://<ip address>:8081/service/rest/v1/components?repository=your-respository-name" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "apt.asset=@your-package.deb"

```

User must have a role with following privileges:  
`nx-repository-view-apt-*-add`, `nx-repository-view-apt-*-read` and `nx-repository-view-apt-*-edit`

If you have timeout error when uploading large files, you can edit the Jetty configuration for the idleTimeout to increase the value (default is 30000):

For docker image, you can do:

```bash
docker exec -u 0 -it nexus /bin/bash
sed -i 's/<Set name="idleTimeout"><Property name="jetty.http.timeout" default="30000"\/><\/Set>/<Set name="idleTimeout"><Property name="jetty.http.timeout" default="300000"\/><\/Set>/g' /opt/sonatype/nexus/etc/jetty/jetty-http.xml

```

Regards,
