Reputation: 31953
I' following this tutorial by Google to put SSL certificate on Google Compute Engine, but after I run the following commands:
openssl genrsa -out example.key 2048
openssl req -new -key example.key -out example.csr
gcloud compute ssl-certificates create certificate --certificate example.csr --private-key example.key
, I found the following error:
ERROR: (gcloud.compute.ssl-certificates.create) Some requests did not succeed:
- The SSL certificate could not be parsed.
However, if you search for it in Google you find that they are practically useless. I even don't know what is missing here, as I followed the tutorial just as it is written.
So why did I get such error and how can I proceed to create the SSL certificate?
Upvotes: 4
Views: 3596
Reputation: 195
Make sure you're specifying the *.crt file as the certificate and not the *.csr
gcloud compute ssl-certificates create certificate --certificate example.crt --private-key example.key
If you're generating a self-signed cert, you would need to generate it using the key and the csr:
openssl x509 -req -days 365 -in example.csr -signkey example.key -out example.crt
Finally, you can also add --verbosity debug flag to your gcloud commands for more info on what's going on.
Upvotes: 5