0

我在 GitAhead 的 Windows 10 下成功添加了远程(私人)GitLab 帐户,但在 Linux openSUSE Leap 15 下我得到“连接失败:SSL 握手失败”。

请注意,我可以从要添加的 GitLab 中的存储库中克隆、拉取、获取、提交、推送存储库,我还尝试使用以下命令重置 SSH 握手:

$ ssh-keygen -R gitlab.mydomain.net
# Host gitlab.mydomain.net found: line 31
/home/user/.ssh/known_hosts updated.
Original contents retained as /home/user/.ssh/known_hosts.old
$ ssh git@gitlab.mydomain.net
The authenticity of host 'gitlab.mydomain.net (<IP>)' can't be established.
ECDSA key fingerprint is SHA256:**************.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitlab.mydomain.net,<IP>' (ECDSA) to the list of known hosts.
Welcome to GitLab, @UserName!
Connection to gitlab.mydomain.net closed.

但它仍然不起作用,任何人都知道是否有一些配置可以在 Linux 下允许它?

谢谢

4

1 回答 1

0

首先,检查服务器端目录的权限。home-dir 和 .ssh-dir 应该用chmod 700. 密钥文件也是如此。

您应该瞄准您的服务器上的无密码登录。一旦这个工作,GitAhead 应该没问题。如果您的服务器端有 Git-Shell /etc/passwd,请将其替换/bin/sh为以发送您的 pubkey:在客户端上,输入ssh-copy-id -i yourprivatekeyfile somerandomgituser@ipofyourgitserver. 之后,如果成功,您可以将该/etc/passwd行重置回 Git-Shell。

于 2020-11-27T08:33:34.080 回答