The PEM file should contain both the certificate and the private key with the following structure :
-----BEGIN PRIVATE KEY-----
………………………………...
…………………………………
…………………………………
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
………………………………...
…………………………………
…………………………………
-----END CERTIFICATE-----
Also please make sure that the PEM file you upload is not password-protected because password-protected PEM files are not supported.