Failed to connect to repository : Error performing command: C:\Program
Files\Git\bin ls-remote -h ssh://git@localhost:7999/sam/bo.git HEAD
当尝试将GIT与Jenkins集成时,会遇到上述错误。请看下面错误的屏幕截图。
Jenkins GIT URL Repo问题
发布于 2017-07-31 07:12:21
在您的问题中,您使用了C:\
。git路径必须以https://
开头
您尚未为GIT设置凭据,请创建它并在jenkins的凭据框中设置。
发布于 2019-01-01 05:06:32
如您所见,该命令未正确启动,您必须正确设置git.exe的路径,以便该命令包含git.exe的完整路径(包括git.exe)
您的命令是C:\Program Files\Git\bin ls-remote -h ssh://git@localhost:7999/sam/bo.git HEAD
您必须在Manage Jenkins>Global Tool Configuration>Path中将Git的路径(包括git.exe)设置为Git可执行文件,并将路径设置为"C:\Program Files\Git\bin\git.exe“
设置路径后,它将类似于C:\Program Files\Git\bin\git.exe ls-remote -h ssh://git@localhost:7999/sam/bo.git HEAD
完成此操作后,您可以检查https链接或ssh链接,并检查上面回答的凭据。
https://stackoverflow.com/questions/36126664
复制相似问题