# Cannot upload artifacts via CURL to Nexus Container once HTTPS is enabled

**URL:** <https://community.sonatype.com/t/cannot-upload-artifacts-via-curl-to-nexus-container-once-https-is-enabled/7741>\
**Category:** Sonatype Nexus Repository\
**Created:** [November 29, 2021, 6:20pm UTC](https://community.sonatype.com/t/cannot-upload-artifacts-via-curl-to-nexus-container-once-https-is-enabled/7741 "2021-11-29T18:20:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![christopher.m.miller](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@christopher.m.miller](https://community.sonatype.com/u/christopher.m.miller)\
**Post date:** [November 29, 2021, 6:20pm UTC](https://community.sonatype.com/t/cannot-upload-artifacts-via-curl-to-nexus-container-once-https-is-enabled/7741/1 "2021-11-29T18:20:25Z")

</div>

Running Nexus v3:3.30.0 container with Podman 1.4.2-stable2. Once the container is successfully up and running, I’m able to use curl to upload and download artifacts (ISOs) with no issues along with curl -l -v command returns the web page via text output.

However once I enable HTTPS using the following documentation, Inbound SSL - Configuring to Serve Content via HTTPS ([Configuring SSL](https://help.sonatype.com/repomanager3/system-configuration/configuring-ssl)), when testing again with curl against the URL, I’m getting the following error.

```auto
[user_a@host_a]$ curl -l -v https://10.88.0.255:8081

    Rebuilt URL to: https://10.88.0.255:8081/
      Trying 10.88.0.255...
    TCP_NODELAY set
    Connected to 10.88.0.255 (10.88.0.255) port 8081 (#0)
    ALPN, offering h2
    ALPN, offering http/1.1
    successfully set certificate verify locations:
      CAfile: /etc/pki/tls/certs/ca-bundle.crt
      CApath: none
    TLSv1.3 (OUT), TLS handshake, Client hello (1):
    TLSv1.3 (IN), TLS handshake, Server hello (2):
    TLSv1.2 (IN), TLS handshake, Certificate (11):
    TLSv1.2 (IN), TLS handshake, Server key exchange (12):
    TLSv1.2 (IN), TLS handshake, Server finished (14):
    TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
    TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
    TLSv1.2 (OUT), TLS handshake, Finished (20):
    TLSv1.2 (IN), TLS handshake, Finished (20):
    SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
    ALPN, server did not agree to a protocol
    Server certificate:
     subject: C=XX; ST=XX; L=XXXXXXXX; O=XX-XX; OU=XXX; CN=xxxx-xxxxxxx.xxxxxxxx.com
     start date: Nov 28 19:49:21 2021 GMT
     expire date: Nov 28 19:49:21 2023 GMT
     subjectAltName does not match 10.88.0.255
        SSL: no alternative certificate subject name matches target host name '10.88.0.255'*
    Closing connection 0
    TLSv1.2 (OUT), TLS alert, close notify (256):
    curl: (51) SSL: no alternative certificate subject name matches target host name '10.88.0.255'

```

I’ve also tried to use the IP Address above for the DNS entries when creating the .jks file and still get errors.

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [November 30, 2021, 3:25pm UTC](https://community.sonatype.com/t/cannot-upload-artifacts-via-curl-to-nexus-container-once-https-is-enabled/7741/2 "2021-11-30T15:25:55Z")

</div>

The error message says the certificate doesn’t match the host.

---

<div class="post-metadata">

**Author:** ![christopher.m.miller](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@christopher.m.miller](https://community.sonatype.com/u/christopher.m.miller)\
**Post date:** [December 1, 2021, 7:35pm UTC](https://community.sonatype.com/t/cannot-upload-artifacts-via-curl-to-nexus-container-once-https-is-enabled/7741/3 "2021-12-01T19:35:55Z")

</div>

I’m still learning my way around when it comes to certs.

However the DNS alias that I put in the cert request, I placed into /etc/hosts along with the IP address assigned to the container and that fixed the issue.
