Home > Software engineering >  org.springframework.boot.context.properties.bind.BindException: 'spring.cloud.config.server.git
org.springframework.boot.context.properties.bind.BindException: 'spring.cloud.config.server.git

Time:03-10

I have tried several answers on stackoverflow but can't figure it out how to make it work


APPLICATION FAILED TO START


Description:

Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.cloud.config.server.git' to org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentProperties failed:

Reason: Property 'spring.cloud.config.server.git.privateKey' is not a valid private key

Action:

Update your application's configuration

This is the application.properties file

server.port=8881
[email protected]:my_user/my_repo.git
spring.cloud.config.server.git.searchPaths=*configs
spring.cloud.config.server.git.clone-on-start=true
spring.cloud.config.server.git.ignore-local-ssh-settings=true
spring.cloud.config.server.git.passphrase=
spring.cloud.config.server.git.private-key=-----BEGIN OPENSSH PRIVATE KEY-----\n\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdzc2gtcn\
NhAAAAAwEAAQAAAYEAtl/5Hbu/bHQsddLTMI7Ph0G86/xOaq/xqs3CyQyNCCh2lzz oeBe\
lZbG16JQ4HrhA q9vT1xIISGS8XEf46FvbulBl473rOlOk50xTQfA5a/6CHZ2PXKq1oU2T\
PyILIB4MDWBYUDBWUBDUWNDUNWUNDUWNDUWNUDNWUBDBWWVWYXVBWB64 lhKmnyEnSaHZm\
2Jxe2RdrpTYn81WsgJKtvy7McR0eo6vGejCVTg 0aOvKw0XX5Dwy06uNwGjjWSaN0WzU7O\
Uu/Sh1gQF  lCu5IO0u/hAXzhrOcTLosNw1irNLBO9tskk/rhZ2ufgjsFZkJ0xyZGwiTD0\
v6nd wsmf0k KGtr8U1tf8Aw1JQ2U3 WJVxZRXmodHijuPie0b6pEpPu3xqHEvMjfKiYQt\
mH/R3tVh1FRJa88KkUt6GAU/Brh6Cczf LLUymZb5sM0tCNJ9pWbKZFeme92DDN3 ul/Wt\
tGXpCDoljU BrosvasO2bkA58PPH7OA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6YC0OPWQvwaYgCzKOA4/MXSu3nRpnXUGZ0EKhAAAA\
wF5UyJZJaYSwDIsBFIkEwmzL/jLo66xcaaOl7sMQLqVIdWkT14E6dPiYXn5vexy3DaoAoZ\
2Z3xszEnLlzQ36HTrKLWyZdR9nAwQtz2q1 GpywDDao2DclAWQvQaCUuMQOK94y3ECkGIy\
DOOVhox/mlbFBONR3xF5K Th8uq96kqi51MAqqkcdL6/zNMFIBJT w2KoQBVe3PFn3TFfU\
eJajcOI3I6aBwgxPd2YPrSysPHIBqLnJAMfXPocW9XBb1VPgAAAMEA8EWQBzUgeevti8BZ\
8YBw2HSqZXKi 8rqrM4QxVW2EybrGSwIhzDTSwwK8vOw8HT gcj7z8jltLqCBt/Zufihzg\
jNtoe v9VKEuH8jd6xb1apJzR3DKyJgpBaDCCg75xIj  Qb/horE WolcbCAjLHZo/hW p\
nGWYd/eX3C2jCTCLmAp38lsP/HHLt0JASd5Hvg031z5fzWjMLvBOiDM2yFWozcaRsi FZn\
qPpE5aMTyLRx z8kA9s/Zp9Xf6SCDFAAAAwQDCUC8gfMMuWotFgFfJfjDAdfiyfAsGDRu4\
d3J3NPLyqG9YfanjvfI8ezRFRFRFRFRFRFRFFRFRBVGBGBBGBGJtDKcsJaS2Jzu/PpvVcx\
EngcryKis GWYXTBYTWFEYBXWGYEXTGWYTGEYXGWYUEGUWGUEBWHUYXGUYGXUYBGZjyYt6\
wTOAKcfstv885VfKvGBBGBGBGBGBGBRFRFRFRFRFFDDSDWWDEDQfFtG/8lPmY8UqliKd7L\
SxX6llZwFWzCUAAAAWVmlwd.HXGUYWGUYXUYBGUYXGEUY3GBEUYXG3UYEG3UXGECAwQF\n\
-----END OPENSSH PRIVATE KEY-----

CodePudding user response:

Your private key (which you should no longer use for anything now that is has been exposed publicly) is not an RSA key, which is the only key type that Spring Cloud Config supports.

In other words: Only private keys that start with -----BEGIN RSA PRIVATE KEY----- are supported.

There are some more details in the reference documentation: https://cloud.spring.io/spring-cloud-config/reference/html/#_authentication

  • Related