Jenkins GIT_SSH组件权限导致build失败的问题。

Posted 假如酷爱

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jenkins GIT_SSH组件权限导致build失败的问题。相关的知识,希望对你有一定的参考价值。

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();  

}

以上是关于Jenkins GIT_SSH组件权限导致build失败的问题。的主要内容,如果未能解决你的问题,请参考以下文章

解决Jenkins权限配置错误,导致登录时出现没有Overall/read权限

Jenkins权限配置失误后导致登录失败的解决办法

jenkins配置权限不对导致登陆后出现空白页面

jenkins配置权限不对导致无法登陆或者空白页面解决办法

Jenkins权限配置失误后导致登录失败的解决办法

devops持续集成开发——jenkins的权限管理配置