Describe the bug
Using a fresh new project from start.spring.io:
Java version: 17
Select: org.springframework.boot:spring spring-boot-starter-parent:2.7.5
Add dependencies for: spring-cloud-config-server (Spring Cloud 2021.0.4 by default)
I configured my application.yaml as:
spring:
application:
name: config-service
cloud:
config:
server:
git:
uri: https://source.developers.google.com/p/my-gcp-project-name/r/config-repo
clone-on-start: true
following the directions from here.
when running this inside of a GKE cluster the application fails with:
org.eclipse.jgit.api.errors.TransportException: https://source.developers.google.com/p/my-gcp-proyect/r/config-repo: 400 Bad Request at
org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:224)
~[org.eclipse.jgit-5.13.1.202206130422-r.jar:5.13.1.202206130422-r] at
org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:311)
~[org.eclipse.jgit-5.13.1.202206130422-r.jar:5.13.1.202206130422-r] at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:182)
~[org.eclipse.jgit-5.13.1.202206130422-r.jar:5.13.1.202206130422-r] at
org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.cloneToBasedir(JGitEnvironmentRepository.java:651) ~[spring-cloud-config-server-3.1.4.jar:3.1.4] at
org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.initClonedRepository(JGitEnvironmentRepository.java:356) ~[spring-cloud-config-server-3.1.4.jar:3.1.4] at
org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.afterPropertiesSet(JGitEnvironmentRepository.java:277) ~[spring-cloud-config-server-3.1.4.jar:3.1.4] at
org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.afterPropertiesSet(MultipleJGitEnvironmentRepository.java:66) ~[spring-cloud-config-server-3.1.4.jar:3.1.4]
...
Caused by: org.eclipse.jgit.errors.TransportException: https://source.developers.google.com/p/my-gcp-proyect/r/config-repo: 400 Bad Request at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:719)
I've also tried adding com.google.auth:google-auth-library-oauth2-http as a dependency
Comment From: ryanjbaxter
Does it work when running outside of GKE?
Comment From: Alos
I did not get a chance to test, since outside the running instance I don't have the proper credentials, I can try and experiment running locally with imported creds. Do you think that the issue is not having local space to checkout into?
Comment From: ryanjbaxter
Hard to say, but if we could determine if its only a problem on GKE, that would help.
Comment From: Alos
Let me run some experiments and report back!
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.