Upload RPM/DEB packages to NxRM repo ends up with http 500

I am building my own GO tool to upload DEBs or RPMs to my NxRM-hosted repos.

The source code is at GitHub - jeanfrancoisgratton/nxrmuploader: Nexus Repository Manager binary packages uploader.

My environment file (that you’d need to edit according to your own test environment) is :

{
  "YUM": [
    {
      "name": "nexusDNF",
      "url": "YOUR URL",
      "username": "YOUR USERNAME",
      "password": "YOUR PASSWD"
    }
  ],
  "APT": [
    {
      "name": "nexusAPT",
      "url": "YOUR URL",
      "username": "YOUR USERNAME",
      "password": "YOUR PASSWD"
    }
  ]
}

Basically run my tool with add env to setup the config file.

Once done, read README.md to see how to upload, but here’s the thing: I get an http 500 error, with no more info (even in the server’s log). I’ve no idea where to go from there.

Any hint ?

EDIT:

Found logs at /opt/nexus3/sonatype-work/nexus3/log/nexus.log. That’s for a DEB package, apparently there’s another set of issues with RPMs.

2024-01-05 15:12:53,666-0500 WARN  [qtp1698019338-2617]  $USERNAME org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: POS
T /repository/aptLocal/                                                                                                                                  
java.io.IOException: invalid header --dc4138                                                                                                             
        at org.sonatype.nexus.repository.apt.internal.org.apache.commons.compress.archivers.ar.ArArchiveInputStream.getNextArEntry(ArArchiveInputStream.j
ava:112)                                                                                                                                                 
        at org.sonatype.nexus.repository.apt.internal.org.apache.commons.compress.archivers.ar.ArArchiveInputStream.getNextEntry(ArArchiveInputStream.jav
a:240)                                                                                                     

I’ve no idea where or why that invalid header --dc4138 error comes out of.

That error may suggest that the binary you’re uploading is corrupt or in an unexpected format. The header here appears to be a reference to archive (compression) format.