在slave上是git clone ssh是可以成功的,但是jenkins调用slave节点就报如下错误:

ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init  XXXX
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
	... 22 more
ERROR: Error cloning remote repo 'origin'
Finished: FAILURE


解决:需要在jenkins master上设置Tool Location,如下:

jenkins windows slave 报错ERROR: Error cloning remote repo 'origin'

此外:首次下载,需要slave设置ssh-key 到gerrit上,并需要clone一次,选择主机信任。

1.ssh-keygen -t rsa -C test@163.com

2.cat ~/.ssh/id_rsa.pub

3.git config --global user.email "test@163.com"

4.git config --global user.name "test"

5.git config --global core.editor vim

6.git clone ssh:xxxxxxx


 
                    
            
                

相关文章:

  • 2021-12-10
  • 2022-02-17
  • 2021-10-30
  • 2021-07-26
  • 2021-06-09
  • 2021-07-28
  • 2021-12-02
  • 2021-06-21
猜你喜欢
  • 2021-11-30
  • 2021-07-25
  • 2021-12-24
  • 2022-12-23
  • 2021-09-29
  • 2022-01-01
  • 2021-09-02
相关资源
相似解决方案