[EnvInject] - Loading node environment variables.
构建中 在工作空间 /Users/jenkins/workspace/XXX 中
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url http://gitlab.XXX.com/Test/XXX # timeout=10
Fetching upstream changes from http://gitlab.XXX.com/Test/XXX
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress http://gitlab.XXX.com/Test/XXX +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from http://gitlab.XXX.com/Test/XXX
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160)
at hudson.scm.SCM.checkout(SCM.java:504)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1798)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress http://gitlab.XXX.com/Test/XXX +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: warning: redirecting to https://gitlab.XXX.com/Test/XXX.git/
error: refs/remotes/origin/master does not point to a valid object!
error: refs/remotes/origin/master does not point to a valid object!
error: refs/remotes/origin/master does not point to a valid object!
remote: Counting objects: 571, done.
remote: Compressing objects: 1% (1/92)
remote: Compressing objects: 2% (2/92)
remote: Compressing objects: 3% (3/92)
remote: Compressing objects: 4% (4/92)
remote: Compressing objects: 5% (5/92)
remote: Compressing objects: 6% (6/92)
remote: Compressing objects: 7% (7/92)
remote: Compressing objects: 8% (8/92)
remote: Compressing objects: 9% (9/92)
remote: Compressing objects: 10% (10/92)
remote: Compressing objects: 11% (11/92)
remote: Compressing objects: 13% (12/92)
remote: Compressing objects: 14% (13/92)
remote: Compressing objects: 15% (14/92)
remote: Compressing objects: 16% (15/92)
remote: Compressing objects: 17% (16/92)
remote: Compressing objects: 18% (17/92)
remote: Compressing objects: 19% (18/92)
remote: Compressing objects: 20% (19/92)
remote: Compressing objects: 21% (20/92)
remote: Compressing objects: 22% (21/92)
remote: Compressing objects: 23% (22/92)
remote: Compressing objects: 25% (23/92)
remote: Compressing objects: 26% (24/92)
remote: Compressing objects: 27% (25/92)
remote: Compressing objects: 28% (26/92)
remote: Compressing objects: 29% (27/92)
remote: Compressing objects: 30% (28/92)
remote: Compressing objects: 31% (29/92)
remote: Compressing objects: 32% (30/92)
remote: Compressing objects: 33% (31/92)
remote: Compressing objects: 34% (32/92)
remote: Compressing objects: 35% (33/92)
remote: Compressing objects: 36% (34/92)
remote: Compressing objects: 38% (35/92)
remote: Compressing objects: 39% (36/92)
remote: Compressing objects: 40% (37/92)
remote: Compressing objects: 41% (38/92)
remote: Compressing objects: 42% (39/92)
remote: Compressing objects: 43% (40/92)
remote: Compressing objects: 44% (41/92)
remote: Compressing objects: 45% (42/92)
remote: Compressing objects: 46% (43/92)
remote: Compressing objects: 47% (44/92)
remote: Compressing objects: 48% (45/92)
remote: Compressing objects: 50% (46/92)
remote: Compressing objects: 51% (47/92)
remote: Compressing objects: 52% (48/92)
remote: Compressing objects: 53% (49/92)
remote: Compressing objects: 54% (50/92)
remote: Compressing objects: 55% (51/92)
remote: Compressing objects: 56% (52/92)
remote: Compressing objects: 57% (53/92)
remote: Compressing objects: 58% (54/92)
remote: Compressing objects: 59% (55/92)
remote: Compressing objects: 60% (56/92)
remote: Compressing objects: 61% (57/92)
remote: Compressing objects: 63% (58/92)
remote: Compressing objects: 64% (59/92)
remote: Compressing objects: 65% (60/92)
remote: Compressing objects: 66% (61/92)
remote: Compressing objects: 67% (62/92)
remote: Compressing objects: 68% (63/92)
remote: Compressing objects: 69% (64/92)
remote: Compressing objects: 70% (65/92)
remote: Compressing objects: 71% (66/92)
remote: Compressing objects: 72% (67/92)
remote: Compressing objects: 73% (68/92)
remote: Compressing objects: 75% (69/92)
remote: Compressing objects: 76% (70/92)
remote: Compressing objects: 77% (71/92)
remote: Compressing objects: 78% (72/92)
remote: Compressing objects: 79% (73/92)
remote: Compressing objects: 80% (74/92)
remote: Compressing objects: 81% (75/92)
remote: Compressing objects: 82% (76/92)
remote: Compressing objects: 83% (77/92)
remote: Compressing objects: 84% (78/92)
remote: Compressing objects: 85% (79/92)
remote: Compressing objects: 86% (80/92)
remote: Compressing objects: 88% (81/92)
remote: Compressing objects: 89% (82/92)
remote: Compressing objects: 90% (83/92)
remote: Compressing objects: 91% (84/92)
remote: Compressing objects: 92% (85/92)
remote: Compressing objects: 93% (86/92)
remote: Compressing objects: 94% (87/92)
remote: Compressing objects: 95% (88/92)
remote: Compressing objects: 96% (89/92)
remote: Compressing objects: 97% (90/92)
remote: Compressing objects: 98% (91/92)
remote: Compressing objects: 100% (92/92)
remote: Compressing objects: 100% (92/92), done.
Receiving objects: 0% (1/571)
Receiving objects: 1% (6/571)
Receiving objects: 2% (12/571)
Receiving objects: 3% (18/571)
Receiving objects: 4% (23/571)
Receiving objects: 5% (29/571)
Receiving objects: 6% (35/571)
Receiving objects: 7% (40/571)
Receiving objects: 8% (46/571)
Receiving objects: 9% (52/571)
Receiving objects: 10% (58/571)
Receiving objects: 11% (63/571)
Receiving objects: 12% (69/571)
Receiving objects: 13% (75/571)
Receiving objects: 14% (80/571)
Receiving objects: 15% (86/571)
Receiving objects: 16% (92/571)
Receiving objects: 17% (98/571)
Receiving objects: 18% (103/571)
Receiving objects: 19% (109/571)
Receiving objects: 20% (115/571)
Receiving objects: 21% (120/571)
Receiving objects: 22% (126/571)
Receiving objects: 23% (132/571)
Receiving objects: 24% (138/571)
Receiving objects: 25% (143/571)
Receiving objects: 26% (149/571)
Receiving objects: 26% (151/571), 1.10 MiB | 1.05 MiB/s
Receiving objects: 26% (151/571), 3.50 MiB | 1.70 MiB/s
Receiving objects: 26% (151/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 27% (155/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 28% (160/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 29% (166/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 30% (172/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 31% (178/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 32% (183/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 33% (189/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 34% (195/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 35% (200/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 36% (206/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 37% (212/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 38% (217/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 39% (223/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 40% (229/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 41% (235/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 42% (240/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 43% (246/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 44% (252/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 45% (257/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 46% (263/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 47% (269/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 48% (275/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 49% (280/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 50% (286/571), 6.95 MiB | 2.25 MiB/s
Receiving objects: 50% (290/571), 11.61 MiB | 2.83 MiB/s
Receiving objects: 50% (290/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 51% (292/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 52% (297/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 53% (303/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 54% (309/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 55% (315/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 56% (320/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 57% (326/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 58% (332/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 59% (337/571), 16.64 MiB | 3.53 MiB/s
remote: Total 571 (delta 95), reused 121 (delta 67)
Receiving objects: 60% (343/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 61% (349/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 62% (355/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 63% (360/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 64% (366/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 65% (372/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 66% (377/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 67% (383/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 68% (389/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 69% (394/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 70% (400/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 71% (406/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 72% (412/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 73% (417/571), 16.64 MiB | 3.53 MiB/s
Receiving objects: 74% (423/571), 16.64 MiB | 3.53 MiB/s
fatal: cannot read existing object info 8b483b9abf3c88ef01d68c9c140f0cf120d4fcf6
fatal: index-pack failed
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1996)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1715)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:860)
... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
解决方法
因为我是将一台机器全部复制到另一台机器上,所以使用新机器jenkins构建失败,
主要原因:可能是该项目流水线.git 存在缓存,差异性导致
解决办法:
1.查看 构建中 在工作空间: /Users/jenkins/workspace/XXX 中,进入该工作空间
2.找到.git文件,进行删除操作
3.重新构建,即可成功