Reputation: 748
I was going through Spring Cloud Config's documentation and what I learnt is that the Spring prefers using Git as a config repository as it supports labelling/branching etc., and it is also the default option with Spring Cloud Config.
Now I have two questions
Requesting for anyone to provide insight on these questions.
Upvotes: 0
Views: 704
Reputation: 93
You can disable Git ssl config - git config --global http.sslVerify false
Create a Git Personal Access Token. Use token to keep in spring.cloud.config.token property. Use config below in application.yml
server:
git:
uri: https://github.com/AKS/config/
OR
uri: file:///AKS/config/
skipSslValidation: true
search-paths:
- config-map
try-master-branch: false
username: user
password: ******
default-label: <branch-name-git-branch>
clone-on-start: true
Upvotes: 1
Reputation: 19
You can use you config server with a local property files stored on your host. To do so, you just need to use the native profile
with the following properties
spring.profiles.active=native
spring.cloud.config.server.native.searchLocations=file:///C:/path/to/your/config/folder
Then the following properties to set up your Git repo are not longer needed:
#spring.cloud.config.server.git.uri=...
#spring.cloud.config.server.git.username=...
#spring.cloud.config.server.git.password=...
#spring.cloud.config.server.git.timeout=10
#spring.cloud.config.server.git.clone-on-start=true
Upvotes: 0