我有一个运行Jenkins的实例和BitBucket插件,当提交被推送到BitBucket时,勾选了复选框。
我相信BitBucket webhook设置正确,因为我可以看到请求在webhook的日志中返回200响应。我用于webhook到Jenkins的URL格式为:
https://username:apiKey@JENKINS_URL/bitbucket-hook/?Jenkins-Crumb=GENERATED_CSRF_CRUMB
在Jenkins,我可以看到,在'bitbucket hook log'中,Jenkins尝试发出git命令,但是超时了。这是插件的最后一个日志:
Started on Oct 12, 2016 2:08:19 PM
Using strategy: Default
[poll] Last Built Revision: Revision 1e47f849c9a899582dee0199abb208c0a3ca40ee (refs/remotes/origin/develop)
using GIT_SSH to set credentials The SSH Key for Jenkins to pull from bitbucket
> git.exe ls-remote -h https://bitbucket.org//USER/PROJECT.git # timeout=10
ERROR: Timeout after 10 minutes
ERROR: Failed to join a process
org.jvnet.winp.WinpException: Failed to read environment variable table error=299 at .\envvar-cmdline.cpp:201
at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126)
at org.jvnet.winp.WinProcess.getCommandLine(WinProcess.java:102)
at hudson.util.ProcessTree$Windows$1.getArguments(ProcessTree.java:441)
at hudson.plugins.msbuild.MsBuildKillingVeto.vetoProcessKilling(MsBuildKillingVeto.java:55)
at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:239)
at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:422)
at hudson.util.ProcessTree.killAll(ProcessTree.java:142)
at hudson.Proc$LocalProc.destroy(Proc.java:378)
at hudson.Proc$LocalProc.kill(Proc.java:370)
at hudson.Proc$1.run(Proc.java:157)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
我认为SSH密钥设置正确,因为它们适用于手动构建和其他作业。
我知道超时后返回的错误与身份验证/权限错误有关,但Jenkins能够在手动构建期间运行其他git命令。
这与this问题中描述的问题相同,但我尝试使用SSH密钥和用户名/密码作为凭据,我仍然遇到同样的问题。
有没有人遇到此错误,或者我在Jenkins服务器上配置错误?
任何帮助将不胜感激!