Failed to run git clone command

18 views
Skip to first unread message

Sifu Tian

unread,
Dec 16, 2024, 2:25:55 PM12/16/24
to go-cd
Hi,

We keep getting an error randomly throughout our pipelines that require us to rerun them.
This continue to be and issue when we have over 50 pipelines that we have to retriever.
They all seem to happen at the exact same time when a commit is merged.  This behavior is not consistent but random.

Any help would be greatly appreciated.

STDERR: fatal: the remote end hung up unexpectedly
STDERR: fatal: early EOF
STDERR: fatal: index-pack failed
Failed to run git clone command

Jason Smyth

unread,
Dec 16, 2024, 5:02:59 PM12/16/24
to go-cd
Hi Sifu,

At first glance, this appears to be a Git issue rather than a GoCD one.

The error message seems pretty clear that the remote Git server closed the connection before the client was finished the cloning operation. Do you have access to the Git server's logs for time(s) when the issue has occurred?

That's where I would start.

With that said, I'm not sure that I fully understand the situation you described, so I could be way off base.

Hope this helps,
Jason Smyth

Chad Wilson

unread,
Dec 16, 2024, 10:22:25 PM12/16/24
to go...@googlegroups.com
Yeah, agreed with Jason. This is likely an issue with your git server or the network traffic path between agent and repo server. It is possibly made worse by some semantics of your repository and the size of changes to fetch after the merges.

The repository may be too large and difficult for the server to pack to send to the client with your current network configuration.

Are these HTTP or SSH clones? Is your git server something like GitHub or something internally managed?

If your clones are HTTP AND you have an internal Git server AND there is some kind of reverse proxy in between agent and git server it might be that the reverse proxy is terminating the connection. Could be rate limiting, overload, excessive size of repo/changes to fetch. Similar for ssh clones if there are network load balancers in between your agents and the git server. If GitHub etc you should be able to google to find possible reasons they'd terminate connections.

If HTTP you can enable git debug env vars to see the specific errors curl is getting to try and narrow it down, e.g
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
There are similar flags for SSH clone debugging with a custom GIT_SSH_COMMAND, but won't go into that here.

-Chad

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/go-cd/00259d36-d097-4ef0-a7b2-76f10d4e2baan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages