'Spring Cloud Config - throws invalid private key error

Reason: Property 'spring.cloud.config.server.git.privateKey' is not a valid private key. I have generated SSH key with follwoing command - ssh-keygen -m PEM -t rsa -b 4096.

I have generated the keys with multiple ways like putty gen, Git bash etc., but still I am getting invalid private key. I am using windows 10 pro edition and github repo for centralized configuration. attached the configuration file and error log fileenter image description here



Solution 1:[1]

I have fixed the issue After adding the "passphrase" to properties file as highlighted in th attached message. "passphrase" will be generated at the time of generating keys. enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1