为什么 GoCD 无法使用密码连接到 git repo?

问题描述

我正在尝试将 GoCD(版本 21.2.0)连接到 git 存储库(版本 2.25.1),并且我在“高级设置”部分下添加了密码。但我收到如下所示的权限被拒绝错误

Error performing command: --- Command --- 
git ls-remote git@xxx.xxx.xxx.xxx:sample.git refs/heads/master
--- Environment ---
{}
--- INPUT ----


--- EXIT CODE (128) ---
--- STANDARD OUT ---

--- STANDARD ERR ---
STDERR: Permission denied,please try again.
STDERR: Permission denied,please try again.
STDERR: git@xxx.xxx.xxx.xxx: Permission denied (publickey,password).
STDERR: fatal: Could not read from remote repository.
STDERR: 
STDERR: Please make sure you have the correct access rights
STDERR: and the repository exists.
---

当我直接从终端运行以下命令时,提示输入密码,命令执行成功:

git ls-remote git@xxx.xxx.xxx.xxx:sample.git refs/heads/master

到目前为止,我已经尝试了以下方法

  1. 向 git 服务器添加公钥有效。但现在我无法添加 我尝试连接的 git 服务器的公钥。
  2. 我尝试通过输入密码和不输入密码进行连接 “高级设置”部分下的用户名

我做错了什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)