spring cloud config配置中心获取github上文件时,报错:reject HostKey: github.com
解决方法:
将SSH调用: git@github.com:XXX/config.git
改为https调用:https://github.com/XXX/config.git
spring:
application:
name: cloud-config-center
cloud:
config:
server:
git:
uri: https://github.com/XXXX/config.git
search-paths: config #搜索目录
default-label: master #读取分支
修改完uri就可以正常访问了