![](/img/trans.png)
[英]How to point spring-cloud-config server to a git folder inside a git repo
[英]Spring-cloud-config Git SSH
我用这些作为例子:
'{"git": { "uri": "ssh://git@github.com/spring-cloud-services-samples/cook.git", "hostKey": "AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+...", "hostKeyAlgorithm": "ssh-rsa", "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIJKQIB..."} }'
我终于让它接受了 hostKey 但现在它失败了:
Cannot clone or checkout repository] with root cause
com.jcraft.jsch.JSchException: Auth fail
当 SSH 或 Git 手动克隆时,密钥工作正常。
仅出于测试目的,请尝试ssh URL的scp语法:
ssh://git@github.com:spring-cloud-services-samples/cook.git
^
|
colum is important here
我面临着同样的问题。 您可以使用下面提到的命令在窗口机器中创建 ssh 密钥。
在命令提示符下而不是在 git bash 中试试这个:
ssh-keygen -m PEM -t rsa -b 4096 -C "your email address here"
并尝试在 bootstrap.properties 文件中使用 git ssh 配置:
git@*************************************************configurations.git
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.