Details
Description
I followed the guide and am unable to upload my artifacts for two reasons:
GPG signing doesn't work - this seems to be because I'm using GPG 2.1. So I downgraded to GPG 1.4.20, regenerated my key, so I do actually have a ~/.gnupg/secring.gpg file now, and it still fails:
adam@firestar ~/Work/burp-extender-api (master) $ gradle uploadArchives :compileJava UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :jar UP-TO-DATE :javadoc UP-TO-DATE :javadocJar UP-TO-DATE :sourcesJar UP-TO-DATE :signArchives FAILURE: Build failed with an exception. * What went wrong: Unable to read secret key from file: /home/adam/.gnupg/secring.gpg (it may not be a PGP secret key ring) > Could not find matching constructor for: org.bouncycastle.openpgp.PGPSecretKeyRingCollection(java.io.BufferedInputStream) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED
But it is there (and I generated it per your instructions!):
adam@firestar ~/Work/burp-extender-api (master) $ ls -lh /home/adam/.gnupg/secring.gpg -rw------- 1 adam adam 2.6K Jan 15 11:48 /home/adam/.gnupg/secring.gpg
So I commented out the signing parts of my build.gradle and tried to upload without signing (thinking I could make sure everything else checked out, at least), but then I get this error:
adam@firestar ~/Work/burp-extender-api (master) $ gradle uploadArchives :compileJava UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :jar UP-TO-DATE :javadoc UP-TO-DATE :javadocJar UP-TO-DATE :sourcesJar UP-TO-DATE :uploadArchives FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':uploadArchives'. > Could not publish configuration 'archives' > Failed to deploy artifacts/metadata: Cannot access https://oss.sonatype.org/service/local/staging/deploy/maven2/ with type default using the available connector factories: BasicRepositoryConnectorFactory * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED
I must be doing something wrong, but I really can't see what it is! Adding --info and --debug doesn't provide anything helpful that I could see, but I'm happy to provide that output if you'd like
I've attached my Gradle files, and my ~/.gradle/gradle.properties file is as follows:
signing.keyId=E2C94247 signing.password=<password for secret key> signing.secretKeyRingFile=/home/adam/.gnupg/secring.gpg ossrhUsername=<user generated from https://oss.sonatype.org/#profile;User Token> ossrhPassword=<token generated from https://oss.sonatype.org/#profile;User Token>