2

I am trying to create spring cloud config server to connect to git repository(bitbucket) using an SSH URI. I am following Spring Cloud Config

I generated key pair using ssh-keygen utility and pasted the .pub file content in ssh section of my bitbucket account but when I am running the server that is a spring boot application, I am getting invalid privateKey exception.

I also used the suggestion provided in this stack overflow post but no luck, still getting the same error.

  1. Is there any specific format in which we need to put the private key file in application.yml or .properties file?

  2. And if I want to use .properties instead of .yml then how to place the privateKey property value in a single line as generated private key file text contains new line characters?

Prabhat
  • 338
  • 4
  • 20
  • For anyone still having this issue, use [newline characters](https://stackoverflow.com/a/61487328/5492826) for `.properties` files and literal operator (pipeline `|`) character for `.yaml` files. – emrekgn Aug 19 '21 at 13:32

1 Answers1

0

.pub seems to be public key, you need to provide private one. Anyway, I have similar problem, Base64 encoding error happens during parsing key from yaml:

Caused by: java.lang.IllegalArgumentException: Bad Base64 input character at 4 : 45 (decimal)
Marx
  • 804
  • 10
  • 23