You are getting an error similar to one of the following:
"API rate limit exceeded for xxx.xxx.xx.xxx."
batch response: Rate limit exceeded:
Sometimes the error presents itself differently (eg: a timeout) but the issue is always the same. The number of https requests you can make from GitHub has been exceeded.
Frequently this happens when pulling in dependencies using package managers such as Carthage. It can also happen when you're pulling in large files from GitHub LFS.
The solution is to pull in your assets from Github using SSH instead of https. In a script step before the git-clone step add the following:
git config --global url."email@example.com:" instead of "https://github.com/"