config-server怎么都连不上配置的git库
- 配置:
cloud: config: server: git: uri: https://gitee.com/surick/pig-config.git default-label: ${spring.profiles.active} force-pull: true clone-on-start: true - 报错:
MultipleJGitEnvironmentRepository] - Could not fetch remote for dev remote - 原因:git配置的问题,http.postbuffer设置过大,导致
Integer value http.postbuffer out of range,但是spring cloud默认没有clone-on-start参数的时候,console里面只显示Could not fetch remote for dev remote信息 - 解决方法: 设置git的http.postbuffer为适当值,参考配置:
git config --get http.postBuffer
git config --global http.postBuffer 524288000