I am trying to use VSTS Git as my config repo.
Here's my application.yml (sensitive information hidden or removed)
spring: cloud: config: server: git: uri: URL from VSTS ignore-local-ssh-settings: true host-key-algorithm: ssh-rsa host-key: HOST KEY FROM VSTS search-paths: '{application}' private-key: | -----BEGIN RSA PRIVATE KEY----------END RSA PRIVATE KEY----- passphrase: SOME PASSPHRASE
I keep getting this error:
error: org.springframework.cloud.config.server.environment.NoSuchRepositoryException: Cannot clone or checkout repository
Can anyone help me please?
EDIT-1:
After debug into spring cloud config server, the exact error is the host key is "invalid key type".
Then I realize the hostKey
and hostKeyAlgorithm
were specified.
As soon as I removed these 2 properties, VSTS Git could be connected.
The working application.yml looks like following:
spring: cloud: config: server: git: uri: URL from VSTS ignore-local-ssh-settings: true search-paths: '{application}' private-key: | -----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----