Hi, I have a config server that reads the config from git and secret manager. The git repo only allows ssh key based authentication. (I tried this approach both in github and bitbucket)
I am getting below error when I use springCloudVersion=2021.0.4
.
However if I change the springCloudVersion=2020.0.4
, this works.
I need to use springCloudVersion=2021.0.4
, as I want to integrate gcp-secret-manager which is available in this 2021.0.4 release.
Appreciate any help.
org.springframework.cloud.config.server.environment.NoSuchRepositoryException: Cannot clone or checkout repository: git@github.com:ichandan16/test-config-server.git at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.refresh(JGitEnvironmentRepository.java:313) ~[spring-cloud-config-server-3.1.4.jar!/:3.1.4] at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.getLocations(JGitEnvironmentRepository.java:256) ~[spring-cloud-config-server-3.1.4.jar!/:3.1.4]
Complete stacktrace is attached. scc-pring202104-error.log
Here is pom.xml (formatted to txt as github does not allow attaching .xml files).
Comment From: kvmw
@ichandan16 can you share your git configuration in application.yaml/properties?
Also, are you by any chance using key with passphrase ?
Comment From: ichandan16
Hi, here is the application.yaml file inline (attachment of file type yaml is not supported). I am not using key phrase for the aforementioned version. When I use keyphrase it does not work.
server:
port: ${PORT:8080}
spring:
application:
name: config-server
profiles:
active: git,secret-manager
cloud:
config:
server:
gcp-secret-manager:
application-label: application
profile-label: profile
token-mandatory: false
order: 1
git:
uri: git@github.com:ichandan16/test-config-server.git
order: 2
Comment From: kvmw
Based on above config, your app is using the ssh configuration from the host machine (~/.ssh
) so i would suggest you check your local ssh key which being used and the known_hosts file.
try with strictHostKeyChecking: false
config to find out if the problem is related to host-file algorithm or the private key.
Comment From: spring-cloud-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: ichandan16
strictHostKeyChecking
Hi, I tried below two options, still not successful:
strictHostKeyChecking: false
ignoreLocalSshSettings: true
Comment From: kvmw
@ichandan16 do you have the same problem with 2021.0.5
?
2021.0.5
was released few days ago.
Comment From: spring-cloud-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-cloud-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.