2017-08-04 19 views
0

我正在为放置在Bitbucket存储库上的Android项目设置Jenkins。作为构建过程的一部分,我在git fetch命令期间不断获取超时值。以下是控制台日志。Jenkins的Git Fetch在Bitbucket存储库的构建过程中因超时而失败

started by user SUKHVIR SINGH

Building in workspace C:/RCJenkins Cloning the remote Git repository Cloning repository

https://[email protected]/scm/ /myproject.git git.exe init C:\RCJenkins # timeout=10 Fetching upstream changes from https://[email protected]/scm/ /myproject.git git.exe --version # timeout=10 using GIT_ASKPASS to set credentials Setting http proxy: abc.xyz.company.com:80 git.exe fetch --tags --progress https://[email protected]/scm/ /myproject.git +refs/heads/:refs/remotes/origin/ ERROR: Timeout after 10 minutes ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git.exe fetch --tags --progress https://[email protected]/scm/ /myproject.git +refs/heads/:refs/remotes/origin/" returned status code -1: stdout: stderr: at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1924) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1643) 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 hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1075) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1115) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485) at hudson.model.Run.execute(Run.java:1735) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405) ERROR: Error cloning remote repo 'origin' Finished: FAILURE

我做了什么至今: -

1)下载和我的本地机器 2)创建的管理员用户安装最新的稳定詹金斯2.60.2。 3)创建自由式作业。 4)配置作业以使用reposiory url“https://[email protected]/scm/ /myproject.git”并在Jenkins凭证管理器中添加存储库凭证。

此前,正在使用的工作区在我的机器上没有正确的权限,甚至连git命令行都无法正常工作。现在我已将Job配置更改为使用具有写入/读取权限的自定义工作区位置。 我能够通过命令行在工作区执行git命令,但是当我通过Jenkins开始构建过程时,上面提到了超时错误。以下是我的作业配置的屏幕截图。 enter image description here

+0

你需要这种流量的代理服务器吗?它看起来像一切都是内部的,包括你的Bitbucket服务器实例,所以根据你的网络配置,你可能不需要通过代理。 –

+0

我已经在Jenkins中添加了代理详细信息 - >管理插件>高级。我使用测试连接按钮在Jenkins中测试了代理,并且成功了。其实,我在公司网络工作,这就是为什么它有代理。 –

+0

我试图建立一个公共存储库,并能够建立。似乎与凭据有关,但需要弄清楚什么。 –

回答

0
  1. 下载并安装Wireshark的,看看什么是您的网络上的事情。为此,请双击网络接口/开始录制,执行2.停止录制,使用“字符串”和“数据包字节”搜索您的URL并右键单击 - >跟踪 - > TCP数据流。

  2. 再次测试您的确切链接。首先用验证代理,然后用build。