Gloud crashed (AttributeError): '_RSAPrivateKey' object has no attribute 'sign'

when I opened the zsh to keep it activated but when I try to deploy my django application with travis I got the following error when I tried to execute a gcloud command.

 $HOME/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file travis-credentials.json
ERROR: gcloud crashed (AttributeError): '_RSAPrivateKey' object has no attribute 'sign'

I tried 2.6.1, 2.8 (my previous version), 3.4.1(most updated version), but none of them worked. idea on how to fix this?

I don’t believe there’s really a way to tell, but if you haven’t you can use the history also travis logs commands to list previous commands and if you’ve deleted it (RSA), this would be helpful. If you log into the Google Cloud shell, there’s no deletion that takes place. This is because it’s only ever scheduled, not deleted, until AFTER the 7 day warning.

Try updating keys, and read the link I attached. You’ll want to run once you’ve updated RSA:

touch .travis.yml && travis encrypt-file ./deploy_key --add

Make sure everything is where it’s supposed to be:

cat id_rsa.pub >> authorized_keys

Then this should fix the issue.

Happy building
Travis CI Staff
Montana Mendy

1 Like

this did the trick perfectly @montana!!! thank you

Hey @SolarUltima,

No problem, glad I could help.

Montana Mendy
Travis CI Staff

1 Like

I want to add an answer here because this question is phrased the same way I phrased my question in here and the problem/solution is different than what Montana suggested.
This error only happens when you use the latest gcloud version (331.0.0 currently). Although it is not desirable, downgrading gcloud to 330.0.0, , resolves the issue.
gcloud components update --version 330.0.0

1 Like

Our team is using the Travis CI App Engine deployer and ran into this same problem. We’ve since moved away from it and configured the GCloud SDK manually to an older version so we could deploy, but is there any hope that this issue will be resolved internally in the GAE deployer?

Imprint