Open maslano opened 3 years ago
Do you have clone on start enabled?
Yes, should I try without?
I repeated the test with spring.cloud.config.server.git.cloneOnStart: false with the same result. Repository was checked in already, blocked the git host, got the spring config errors ( Error creating bean with name 'defaultEnvironmentRepository')
spring:
profiles:
active: local
application:
name: config-server
cloud:
config:
server:
git:
uri: ssh://git@bitbucket.myorg.com:7999/apps/config.git
force-pull: true
skipSslValidation: true
refreshRate: 5
strictHostKeyChecking: false
cloneOnStart: false
A similar suggestion has been made in another issue, for which a PR has been submitted as well: https://github.com/spring-cloud/spring-cloud-config/issues/816
Is your feature request related to a problem? Please describe. There is an option to specify git basedir spring.cloud.config.server.git.basedir to have a static place to checkout git repository to. That said, if such repository exists in a specified location the config server should start even if it cannot pull from it at the moment of start. That happens, when the git repo is gone and config server was already running. But it turns out when it is down during config server startup - the startup fails on spring context initialization.
Describe the solution you'd like Config server should acknowledge the fact that the repository in the specified basedir exists, and startup and serve values from that repository until the remote repository is back online
Additional context I have tested it by disabling git repository host in my firewall rules. The config server runs fine until I restart it. The errors I get: