I setup a Nexus Server locally for some testing. I am trying to publish to Nexus locally via command ./gradlew publish
and I am trying to authenticate via mTLS.
I have set up https with a self signed cert and have also enabled mutual TLS on my Nexus server. To test this I have curled https://localhost:8443 and was rejected, but after I added the client cert and key to the request, I received a 200 success, so I know my mTLS is working to some extent.
Now I am trying to publish a repo from local but I am receiving a 401 from server: Unauthorized. I have added the public cert to my /security/cacerts which resolved an error regarding self-signed certs.
Now I am wondering if I can even use mTLS to authenticate to push to Nexus, or if I still need to provide username and pass credentials.
This is the command I am using to publish:
./gradlew publish \ -Djavax.ssl.keyStore=/Users/user65/nexus-key.p12 \ -Djavax.ssl.keyStorePassword=password
I have also curled a PUT request with the jar file. It appears that the SSL connection is successful, but I also see a 401 Unauthorized after that.
Eventually, my goal is to setup Jenkins to push to Nexus.