Suragch
Suragch

Reputation: 511676

Android Studio gradle bintray upload failed: Could not sign version

After running

./gradlew bintrayUpload

I am getting the following error.

:my-library:bintrayUpload FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':my-library:bintrayUpload'.

    Could not sign version '0.8.1': HTTP/1.1 400 Bad Request [message:Private key is required, please supply it by using a JSON body or alternatively you can stored in your Bintray profile]

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

It had been working previously when I installed GPG authentication as described in this tutorial.

However, when I tried to update the version (as described here) it stopped working.

Upvotes: 3

Views: 870

Answers (2)

Carlos Anyona
Carlos Anyona

Reputation: 626

This happens mostly after the local.properties file is regenerated.

Instead of generating a new key, if you still remember the password, in your local.propreties file just add this line:

bintray.gpg.password= yourpassowrd

Upvotes: 2

Suragch
Suragch

Reputation: 511676

I was able to solve this issue by deleting the GPG key in Bintray and then regenerating the keys.

enter image description here

Upvotes: 8

Related Questions