如何解决无法使用 ssh 使用 git 从 KIE 工作台克隆存储库
我使用的是 jbpm 6.5.0,我使用的是 ubuntu 20.10(64 位)
我已经使用 wildfly 在本地主机上下载并运行了 KIE 工作台服务器,并在管理员帐户上创建了一个存储库,但是当我尝试克隆时,出现错误:
$ git clone ssh://admin@localhost:8001/testRepo
cloning into 'testRepo'...
Connection closed by 127.0.0.1 port 8001
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
这是我得到的调试日志。
$ ssh admin@localhost -p 8001 -v
OpenSSH_8.3p1 Ubuntu-1,OpenSSL 1.1.1f 31 Mar 2020
debug1: Reading configuration data /home/jiahao/.ssh/config
debug1: /home/jiahao/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 8001.
debug1: Connection established.
debug1: identity file /home/jiahao/.ssh/id_rsa type -1
debug1: identity file /home/jiahao/.ssh/id_rsa-cert type -1
debug1: identity file /home/jiahao/.ssh/id_dsa type -1
debug1: identity file /home/jiahao/.ssh/id_dsa-cert type -1
debug1: identity file /home/jiahao/.ssh/id_ecdsa type -1
debug1: identity file /home/jiahao/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/jiahao/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/jiahao/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/jiahao/.ssh/id_ed25519 type -1
debug1: identity file /home/jiahao/.ssh/id_ed25519-cert type -1
debug1: identity file /home/jiahao/.ssh/id_ed25519_sk type -1
debug1: identity file /home/jiahao/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/jiahao/.ssh/id_xmss type -1
debug1: identity file /home/jiahao/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.3p1 Ubuntu-1
debug1: Remote protocol version 2.0,remote software version SSHD-CORE-0.12.0
debug1: no match: SSHD-CORE-0.12.0
debug1: Authenticating to localhost:8001 as 'admin'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ssh-dss
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection closed by 127.0.0.1 port 8001
任何帮助将不胜感激。
解决方法
所以,在这里回答我自己的问题,因为我找到了解决方案。
步骤:
-
停止服务器。
ant stop.demo
-
删除 .security 文件夹(位于安装文件夹下的隐藏文件夹)
rm -rf .security
-
在 standalone-full.xml 的
部分下添加以下属性。对我来说,这个文件位于(安装文件夹)/wildflyxxx/standalone/configuration <property name="org.uberfire.nio.git.ssh.algorithm" value="RSA"/>
但是,如果您缺少
部分,您可以在 部分之后添加它。 <system-properties> <property name="org.uberfire.nio.git.daemon.host" value="127.0.0.1"/> <property name="org.uberfire.nio.git.ssh.host" value="127.0.0.1"/> <property name="org.kie.demo" value="false"/> <property name="org.kie.example" value="false"/> <property name="org.uberfire.nio.git.ssh.enabled" value="true"/> <property name="org.uberfire.nio.git.ssh.algorithm" value="RSA"/> </system-properties>
我实际上不确定在何处添加它或是否需要其他属性字段是否重要,但这就是最终对我有用的东西。
-
再次启动服务器,git clone 等现在应该可以使用 RSA 密钥工作了。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。