I am encountering similar issues. I suspect that XCode Cloud limits concurrent network requests, probably to prevent it being abused for staging DDoS attacks.
Setting the following environment variable before running brew appears to result in builds succeeding more reliably
# Limit the number of HTTP requests Git makes in parallel to avoid flakiness in XCode Cloud, which seems to be using a
# proxy that can not handle many concurrent network requests (possibly to prevent being abused for DDoS attacks)
export GIT_HTTP_MAX_REQUESTS=1
Post
Replies
Boosts
Views
Activity
I am encountering similar issues. I suspect that XCode Cloud limits concurrent network requests, probably to prevent it being abused for staging DDoS attacks.
Setting the following environment variable before running brew appears to result in builds succeeding more reliably
# Limit the number of HTTP requests Git makes in parallel to avoid flakiness in XCode Cloud, which seems to be using a
# proxy that can not handle many concurrent network requests (possibly to prevent being abused for DDoS attacks)
export GIT_HTTP_MAX_REQUESTS=1
I'm also affected by randomly occurring 502 errors, e.g.:
[!] Error installing FirebaseCrashlytics
[!] /usr/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /Volumes/workspace/tmp/d20240814-8997-10c5blv --template= --single-branch --depth 1 --branch CocoaPods-10.24.0
Cloning into '/Volumes/workspace/tmp/d20240814-8997-10c5blv'...
fatal: unable to access 'http://github.com/firebase/firebase-ios-sdk.git/': The requested URL returned error: 502
error Command failed with exit code 1.
I suspect that it's an issue with XCode Cloud, as our CI pipelines hosted elsewhere don't have trouble connecting to GitHub.
Restarting the build usually works, but it's tedious (and expensive!)