问题
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.
回答1:
I was able to solve this issue by deleting the GPG key in Bintray and then regenerating the keys.
回答2:
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
来源:https://stackoverflow.com/questions/45750333/android-studio-gradle-bintray-upload-failed-could-not-sign-version