【发布时间】:2020-10-27 21:52:23
【问题描述】:
我正在尝试从我们的内部 gitlab 服务器克隆一个 repo。
我正在运行 Windows 10 和 ubuntu 子系统。我有 putty 代理正在运行...并且我已经设置了我的 bash 环境,因此一旦我启动 bash,我的密钥就会被加载,所以我只需要这样做就可以登录到远程服务器:
jj@DESKTOP-123:/mnt/c/Users/$ whoami
jj
jj@DESKTOP-123:/mnt/c/Users/$ ssh -A root@test.mydomain.com
Warning: Permanently added 'test.mydomain.com,1.1.1.1' (ECDSA) to the list of known hosts.
Linux test.mydomain.com
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Jul 2 10:52:31 2020 from 2.2.2.2
root@testserver:~#
在 gitlab 上,在我的个人资料/头像下,我将我的公钥添加到 ssh 密钥部分。 然后我尝试像这样从 ubuntu 上的 bash 连接
jj@DESKTOP-123:/mnt/c/Users/jj/source/repos/gitlab$ git clone -v git@mygitlabserver:team/documentation.git
Cloning into 'documentation'...
ssh: connect to host mygitlabserver port 22: Resource temporarily unavailable
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我也尝试以“jj”或“root”而不是“git”用户身份连接。
我不确定我错过了什么/做错了什么。
【问题讨论】:
-
文件权限可能吗?这就是我能想到的。 SSH 显然可以正常工作。