ERROR: Error cloning remote repo ‘origin’ timeout=10
Recently, my Jenkins build failed when execute git clone
with following this error message: ERROR: Error cloning remote repo ‘origin’.
- first I suspect it is the network reason, maybe because clone from Bitbucket need took up a lot bandwidth during
git clone
and causing this disconnection. but when I try to git clone on the agent, it works well. - Then I noticed the there is
timeout=10
in the Jenkins console log, I suddenly remembered that I deleted a very large folder a few days ago from git repo, and this may cause the repo more bigger, so it may take more time do a complete clone and it exceeds the Jenkins default clone timeout10
.
Googling and finally I found this issue JENKINS-47660 which is the same problem as mine.