spring-cloud-config - Spring Cloud Config - 无法克隆或签出存储库:ssh://git@github.com//repo.git
问题描述
当我尝试使用它的 URL 时,https
它可以工作,但我不想拥有用户名和密码。我可以使用上面的 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
我正在使用弹簧云配置 - Finchley.Not。不知道我错过了什么。请建议。
解决方案
您必须将您机器的 ssh 密钥添加到存储库中。
应使用以下命令生成 SSH 密钥: ssh-keygen -m PEM -t rsa -b 4096 -C "your_email@example.com"
有关更多信息,您可以查看此链接
https://skryvets.com/blog/2019/05/27/solved-issue-spring-cloud-config-server-private-ssh-key/
推荐阅读
- node.js - 部署后如何解决heroku中的page not found错误
- python - 使用模式 coverage-reports/coverage.xml 未找到 sonar.python.coverage.reportPaths 的报告
- android - 两行约束布局
- python - 当我试图通过 BeautifulSoup 获取它时,它变成空的
我正在尝试从网站解析表格
https://www.kp.ru/best/kazan/abiturient_2018/ivmit/
。Chrome 的 DevTools 向我展示了该表:<div class="t431__table-wapper" data-auto-correct-mobile-width="false"> <tab
- python - .csv 加载重复每个单元格中一列中的所有条目
- python - 从python for循环函数返回一个值
- javascript - 与 Angular 等其他主要 JS 框架不同,为什么 ReactJS 需要这么多外部工具来构建应用程序?
- macos - 如何创建一个接受字符串并将其转换为另一个托管字符串的脚本?
- autosar - AUTOSAR 中如何实现 C/S RTE 端口?
- java - 至少提供了 2 个参数,但在使用规范和排序的查询中仅存在 1 个参数