[英]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.