【发布时间】:2019-02-02 17:04:59
【问题描述】:
我正在尝试使用 GO CI/CD 管道从 gitlab 克隆一个项目。我做了如下步骤,
- 我已经有 ssh 密钥,已添加到 gitlab。
- 尝试从我的本地机器克隆,我可以使用“git clone”命令进行克隆
- 我还尝试使用命令“git clone”在 Go-agent 服务器上克隆项目。
- 克隆项目后,我打开了 ssh 文件夹并使用一些密钥修改了“known_hosts”文件。所以我将 ssh 文件夹放在“C:\Windows\System32\config\systemprofile”位置,因为 GO-CD 管道只在那里查看。
- 但每当我尝试测试管道连接时,它都会显示拒绝访问。以下是错误
:
Repository ssh://git@gitlab.demo.com/exampleproject/someproject.git not found! :
Error performing command: --- Command ---
git ls-remote ssh://git@gitlab.demo.com/exampleproject/someproject.git
--- Environment ---
{}
--- INPUT ----
--OUTPUT ---
--- ERROR ---
STDERR: Host key verification failed.
STDERR: fatal: Could not read from remote repository.
STDERR:
STDERR: Please make sure you have the correct access rights
STDERR: and the repository exists.
我也尝试运行命令ssh -T git@gitlab.demo.com,但它显示“权限被拒绝(公钥)。”。谁能告诉我为什么?我缺少什么配置?
【问题讨论】:
标签: continuous-integration gitlab