微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决为什么 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 举报,一经查实,本站将立刻删除。