[英]Jenkins integration with Git repository
我已经在我的 centos 服务器上安装了 git 2.7。 并在 /srv/repo.git 创建了存储库。 我可以使用命令ssh://user@serverIP:/srv/repo.git
。
我已经在 Windows 10 上的本地计算机上安装了 jenkins 和 git。
错误:
Failed to connect to repository : Command "git.exe ls-remote -h -- ssh://username@server_ip:/srv/repo.git HEAD" returned status code 128:
stdout:
stderr: ssh: Could not resolve hostname server_ip: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
请帮助我。 提前致谢。
我找到了这个问题的解决方案.. jenkins 与 git 服务器的身份验证问题。 只需使用以下步骤解决:
您必须与服务器的 IP 交换“server_ip”。
用户名也应该设置为正确的。 你说你可以这样克隆
ssh://user@serverIP:/srv/repo.git
但是 Jenkins 正试图像这样克隆
ssh://user@server_ip:/srv/repo.git
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.