So When i use the below in .travis.yml it works ..
*********************
deploy:
user: mybintrayuserid
provider: bintray
file: .bintray_descriptor.yml
key: myapikey
***********************
but if i change this to below i get error:
**************************
deploy:
user: mybintrayuserid
provider: bintray
file: .bintray_descriptor.yml
key:
secure: encryptedHashHash
****************************
Error that i get :
[Bintray Upload] Bintray response: 401 Unauthorized. This resource requires authentication .
How i generated the key :
travis encrypt myapikey --add deploy.key
Note: I've added screenshot too for more details ..
Screenshot : http://i.stack.imgur.com/rhkgJ.png
Make sure you use the correct user also.
In my case, I was trying to deploy to a repo owned by an organization, and I wrongly configured the user
as the organization name.
Instead of using the organization as the user
in your .travis.yml
you must use your the username associated with the API key.
I have both the user and the key encrypted - and working.
FWIW, the same thing happens to me. I assume it's a failure with the Bintray plug-in as the notion of a secure token isn't native to the Bintray API but part of the Travis integration provided by Travis.
来源:https://stackoverflow.com/questions/32356238/issue-using-encrypted-bintray-key-in-travis-yml