最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

gradle - Authenticate with mTLS to push to Sonatype Nexus - Stack Overflow

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论