No private key authentication for ivy publish

The ‘ivy-publish’ plugin does not allow private key authentication, unlike the ‘maven-publish’ plugin. This prevents people from using gradle in organizations where ivy is used on a server without password authentication.

Gradle Version: 2.x, 3.x
Operating System: any

You should be able to configure two-way SSL authentication with either Ivy or Maven. There’s no DSL for this (as there is for username/password auth) you just have to configure the build JVM with an appropriate keystore.

Update: I think you are conflating ‘maven-publish’ plugin with the ‘maven’ plugin which does provide a DSL for configuring a private key. However, you should be able to get the same result using ‘ivy-publish’ and ‘maven-publish’ via the regular Java SSL mechanisms mentioned in the link above.

It’d be great to have some documentation showing how to do that (for the gradle-noobs like me). I’ll see how I go with that link, and try produce a minimal example.

There’s nothing really Gradle specific here, this is all general Java SSL stuff, which admittedly, is a bit nebulous. Here’s a SO answer that might help you get going. Step two in the answer can be omitted if your repository is using a trusted certificate.

Sorry, I was less than clear.
The situation is that we have an Ivy server that I need to publish to, using the Ivy SFTP resolver, but there doesn’t seem to be an auth/credentials combination that allows the SSH username and private key to be specified…

Ah yes, you are correct there. The private key solution I mentioned above is HTTPS only.