我正在使用Jenkins(通过Docker安装)来运行CI测试,但是在git clone阶段我总是遇到“内存不足的问题”。
我看到了一些更改git config的解决方案,但是我的git repo将在测试后删除。
有人知道如何解决吗?请参阅下面的详细日志。谢谢。
16:49:39 Cloning the remote Git repository
16:49:39 Cloning repository git@gitlab.com:bxxxxxx_test.git
16:49:39 > git init /home/james/jenkins/workspace/xxxxtate # timeout=10
16:49:39 Fetching upstream changes from git@gitlab.com:xxxxxxxt/cxx_test.git
16:49:39 > git --version # timeout=10
16:49:39 using GIT_SSH to set credentials
16:49:39 > git fetch --tags --progress -- git@gitlab.com:bxxxxxx_test.git +refs/heads/*:refs/remotes/origin/* # timeout=10
16:49:53 ERROR: Error cloning remote repo 'origin'
16:49:53 hudson.plugins.git.GitException: Command "git fetch --tags --progress -- git@gitlab.com:byxxxxxxs_test.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
16:49:53 stdout:
16:49:53 stderr: remote: Enumerating objects: 61, done.
16:49:53 remote: Counting objects: 1% (1/61)
remote: Counting objects: 3% (2/61)
remote: Counting objects: 100% (61/61), done.
16:49:53 remote: Compressing objects: 2% (1/50)
remote: Compressing objects: 4% (2/50)
remote: Compressing objects: 100% (50/50), done.
**16:49:53 fatal: Out of memory, malloc failed (tried to allocate 1074085361 bytes)
16:49:53 fatal: unpack-objects failed**
16:49:53
16:49:53 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2372)
16:49:53 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1985)
16:49:53 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:80)
16:49:53 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:563)
16:49:53 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:787)
16:49:53 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
16:49:53 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:154)
16:49:53 at hudson.remoting.UserRequest.perform(UserRequest.java:211)
16:49:53 at hudson.remoting.UserRequest.perform(UserRequest.java:54)
16:49:53 at hudson.remoting.Request$2.run(Request.java:369)
16:49:53 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
16:49:53 at java.util.concurrent.FutureTask.run(FutureTask.java:264)
16:49:53 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
16:49:53 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
16:49:53 at java.lang.Thread.run(Thread.java:844)
16:49:53 Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to James
16:49:53 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
16:49:53 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
16:49:53 at hudson.remoting.Channel.call(Channel.java:955)
16:49:53 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
16:49:53 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:49:53 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:49:53 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:49:53 at java.lang.reflect.Method.invoke(Method.java:498)
16:49:53 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
16:49:53 at com.sun.proxy.$Proxy86.execute(Unknown Source)
16:49:53 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1105)
16:49:53 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1145)
16:49:53 at hudson.scm.SCM.checkout(SCM.java:505)
16:49:53 at hudson.model.AbstractProject.checkout(AbstractProject.java:1205)
16:49:53 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
16:49:53 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
16:49:53 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
16:49:53 at hudson.model.Run.execute(Run.java:1853)
16:49:53 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
16:49:53 at hudson.model.ResourceController.execute(ResourceController.java:97)
16:49:53 at hudson.model.Executor.run(Executor.java:427)
16:49:53 ERROR: Error cloning remote repo 'origin'
16:49:53 [Slack Notifications] found #65 as previous completed, non-aborted build
16:49:53 [Slack Notifications] will send OnEveryFailureNotification because build matches and user preferences allow it
16:49:55 [WS-CLEANUP] Deleting project workspace...
16:49:55 [WS-CLEANUP] Deferred wipeout is used...
16:49:55 [WS-CLEANUP] done
16:49:55 Finished: FAILURE