Spring config server set up IllegalStateException: You need to configure a uri for the git repository

1.7k Views Asked by At

I was trying to set up the Spring Config server. Even If I am giving a bitbucket url in the config server application's bootstrap.yml, I am still getting exceptions.

Below is the sample from my bootstrap.yml (config-server)

spring.application.name: ${SPRING_APPLICATION_NAME:config-server}
sprint.cloud.config.server.git.searchPaths: '{application}'
sprint.cloud.config.server.git.uri: https://[email protected]/scm/abc/config-store.git
spring.cloud.config.server.git.username: XX
spring.cloud.config.server.git.password:



org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration$$EnhancerBySpringCGLIB$$282f5fb1]: Constructor threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configServerHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration.class]: Unsatisfied dependency expressed through method 'configServerHealthIndicator' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'environmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration$GitRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: You need to configure a uri for the git repository
1

There are 1 best solutions below

0
On

Remove:

sprint.cloud.config.server.git.searchPaths: '{application}'

Because this is used for local environment.