application.yml的配置
spring:
profiles:
active: git
cloud:
config:
server:
创建文件~/.ssh/config,具体内容为
Host git
HostName 114.xxx.xxx.18 #git服务器的ip
StrictHostKeyChecking no
User git #用户名
IdentityFile ~/.ssh/id_rsa
spring:
profiles:
active: git
cloud:
config:
server:
git:
#uri: git@114.xxx.xxx.18:/home/git/smartcity.git 这是官网上的写法,但是不能用
uri: git:/home/git/smartcity.git创建文件~/.ssh/config,具体内容为
Host git
HostName 114.xxx.xxx.18 #git服务器的ip
StrictHostKeyChecking no
User git #用户名
IdentityFile ~/.ssh/id_rsa