在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.
Run Code Online (Sandbox Code Playgroud)
我可以使用Putty连接到git服务器.
我也能够使用Netbeans或命令行克隆git存储库.
.ssh文件夹的权限是700,known_hosts文件是644