Jenkins + BitBucket 自动部署问题

Jenkins可以接受到BitBucket的push请求,但是Jenkins Job中 BitBucket Hook Log
一直提示这个错误,来个大神帮忙解决一下

Last BitBucket Push

Started on Nov 21, 2017 2:39:04 PM
Using strategy: Default
[poll] Last Built Revision: Revision 7c9394c349886727286673b4058e11be5c90dd4c (refs/remotes/origin/autotest)
using GIT_ASKPASS to set credentials BitBucket GIT account

git.exe ls-remote -h https://xxxxxx@bitbucket.org/xxxxxxxx/xxxxx-2016.git # timeout=10
ERROR: Timeout after 10 minutes
FATAL: hudson.plugins.git.GitException: Command "git.exe ls-remote -h https://xxxxxx@bitbucket.org/xxxxxxxx/xxxxx-2016.git" returned status code -1:
stdout:
stderr:
java.io.IOException: hudson.plugins.git.GitException: Command "git.exe ls-remote -h https://xxxxxx@bitbucket.org/xxxxxxxx/xxxxx-2016.git" returned status code -1:
stdout:
stderr:
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:589)
at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381)
at hudson.scm.SCM.poll(SCM.java:398)
at hudson.model.AbstractProject._poll(AbstractProject.java:1446)
at hudson.model.AbstractProject.poll(AbstractProject.java:1349)
at com.cloudbees.jenkins.plugins.BitBucketTrigger$1.runPolling(BitBucketTrigger.java:62)
at com.cloudbees.jenkins.plugins.BitBucketTrigger$1.run(BitBucketTrigger.java:87)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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 java.lang.Thread.run(Thread.java:745)
Caused by: hudson.plugins.git.GitException: Command "git.exe ls-remote -h https://xxxxxx@bitbucket.org/xxxxxxxx/xxxxx-2016.git" returned status code -1:
stdout:
stderr:
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1799)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1525)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1443)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1434)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2539)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:628)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:587)
... 13 more
Done. Took 10 min
No changes

2个回答

git 插件检查下是否可用

xl1006564900
sharly2012 回复airfling: 在Jenkins服务器上面用执行git ls-remote -h https://xxxxxxbitbucket.org/xxxxxxxx/xxxxx-2016.git 几秒钟就结束了,结果也是正确的
2 年多之前 回复
airfling
airfling 回复sharly2012: 最后一个就是检查下Jenkins这个用户有没有权限
2 年多之前 回复
xl1006564900
sharly2012 回复airfling: 在服务器上面手工跑这个命令是可以过的
2 年多之前 回复
airfling
airfling 回复sharly2012: Command "git.exe ls-remote -h https://xxxxxxbitbucket.org/xxxxxxxx/xxxxx-2016.git" returned status code -1: 这个命令提示的是连接超时,你检查下网络或者你登录到jeikens上自己测试下命令是不是可用的
2 年多之前 回复
xl1006564900
sharly2012 可以使用的,创建Job时可用的,没有报错
2 年多之前 回复

可以使用的,创建Job时可用的,没有报错

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问