【发布时间】:2015-05-26 02:58:02
【问题描述】:
在 CentOS 服务器上配置的 Jenkins 上,我正在尝试使用用户名和密码连接到另一台服务器上的 git 存储库。不幸的是,我收到以下错误:
Failed to connect to repository :
Command "/usr/bin/git -c core.askpass=true ls-remote -h ssh://root@[ip addres]:2020/opt/gitrepo/enpapp.git HEAD"
returned status code 128:
stdout:
stderr: Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.*
Please make sure you have the correct access rights and the repository exists.
我可以使用 Putty 连接到 git 服务器。
我还可以使用 Netbeans 或命令行克隆 git 存储库。
.ssh文件夹的权限为700,known_hosts文件的权限为644
【问题讨论】:
-
“我可以使用 Putty 连接到 git 服务器”是否使用与执行 Jenkins 相同的用户帐户?