【发布时间】:2018-10-11 02:11:38
【问题描述】:
当我尝试使用 https 的 URL 时,它可以工作,但我不想拥有用户名和密码。我可以使用上面的 url 及其工作来执行 git clone。但是当我在代码中尝试并点击 localhost:8888/default 端点时,我得到了错误:
{
"error": "Not Found",
"message": "Cannot clone or checkout repository: ssh://git@github.com/<user>/config-repo.git",
"path": "/licensingservice/default",
"status": 404,
"timestamp": "2018-04-30T23:32:54.726+0000"
}
这是我的 application.yml 条目
server:
port: 8888
spring:
cloud:
config:
server:
git:
uri: ssh://git@github.com/<user>/config-repo.git
searchPaths: licensingservice
我正在使用 Spring Cloud 配置 - Finchley.Not。不知道我错过了什么。请提出建议。
【问题讨论】:
-
只要确保你使用'//',如下所示:spring.cloud.config.server.git.uri=E:\\config-repo