一、问题描述
Spring Cloud Config Server 编译报错:
com.jcraft.jsch.jschexception: reject hostkey:github.com
二、解决方法
1.方法1
配置ssh公私钥。
2.方法2
将 uri 链接方式由 git 改为 https:
spring:
application:
name: config-server
cloud:
config:
server:
git:
uri: https://gitee.com/*********/springcloud-config.git # 仓库链接
search-paths:
- springcloud-config
username: ***********
password: ***********