Android Studio gradle bintray upload failed: Could not sign version

依然范特西╮ 提交于 2019-12-24 01:05:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!