[英]Git clone to multiple repos(more than 70) one by one through jenkins file fail
使用 git 通过 Jenkins 管道。 有时相同的代码可以工作,因此身份验证没有问题。 发生的情况是它克隆了一些 repo 并失败了一些,这也不一样,就像有时为 10 个 repo 工作,有时在克隆两个 repo 后失败
这是我们得到的错误:
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from git@gitlab.com:equipay_htdocs/portal/wp-content/plugins/cronjob-scheduler.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:998)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1239)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1299)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress -- git@gitlab.com:equipay_htdocs/portal/wp-content/plugins/cronjob-scheduler.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
You can also have a host where the memory is very fragmented, and can't allocate a page a contiguous memory to fork the process for hosting an SSH session.
如果memory碎片是明显原因,解决方法是通过其他方式访问服务器并重新启动一些始终运行的服务。 我发现 Apache 和 MySQL 是 VM 的罪魁祸首,因为 VM 没有交换分区。 如果这不起作用,则重新启动主机。
下一个建议可能是,如果传入请求的数量超过了允许的数量。
如果未经身份验证的连接数超过 sshd:MaxStartUps 参数,则 sshd 开始拒绝这些连接。
sshd_config 中的 MaxStartups 可以增加,但是在增加 MaxStartUps 之前要查看传入连接的数量是否超过限制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.