Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么GoCD不能使用密码连接到git repo?_Git_Go Cd - Fatal编程技术网

为什么GoCD不能使用密码连接到git repo?

为什么GoCD不能使用密码连接到git repo?,git,go-cd,Git,Go Cd,我正在尝试将GoCD(版本21.2.0)连接到git repo(版本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) --- ---

我正在尝试将GoCD(版本21.2.0)连接到git repo(版本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
到目前为止,我已经尝试了以下方法:

  • 向git服务器添加公钥是有效的。但现在我无法补充 我尝试连接到的git服务器的公钥
  • 我试图通过输入密码和不输入密码来连接 “高级设置”部分下的用户名
  • 我做错了什么