using GIT_SSH to set credentials ERROR: Error cloning remote repo ‘origin‘ hudson.plugins.git.GitException: Failed to setup credentials at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1645) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:352) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:559) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at hudson.remoting.Engine$1$1.run(Engine.java:85) at java.lang.Thread.run(Thread.java:745) at ......remote call to Channel to /xx.xx.xx.xx(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545) at hudson.remoting.Channel.call(Channel.java:830) Jenkins自动构建项目时出现以上错误。具体原因是git将项目拉取下来时候设置的用户组是root,但拉取submodule时用户组为普通users,导致执行git submodule update命令在项目创建文件夹失败。由此可以判断是Build Nodes的问题。node使用JNLP agent方式连接。在Jenkins->Nodes->对应node下的Script Console里执行如下语句:
Thread.getAllStackTraces().keySet().each() {
t -> t.interrupt();
}
时间: 2024-10-25 23:11:22