Search code examples
google-cloud-platformcloudiotgoogle-cloud-iotgcp-ai-platform-training

GCP IoT Core Rejects Public Key with "Certificate is in an invalid PEM format" Error message. What could be wrong?


I am learning how to work with IoT Core. Upon trying to create a device, I encounter an error with the public key. "Certificate is in an invalid PEM format" it says. This public key was supplied as part of the qwiklabs instructions so I don't know what could be wrong.

Maybe it has to do with the instruction below, but I can't fiqure what the error is.

enter image description here

This is the lab: here


Solution

  • I figured the problem. It was not anything serious. Upon creating the device, I chose a wrong Public Key Format. RS256 instead of RS256_X509. Solved the problem by selecting the correct format.