Actually I might have an idea. I believe this could work reasonably well, especially if you consider this is quite an edge case :
We could do an “extended” retry if the first checkout fails. The git clone step already has retry logic for every network operation, and we have something similar in the CocoaPods step too. In short, if the checkout fails don’t just do a simple retry, but instead do a git fetch tags and then a checkout retry.
This will result in a retry every time but only in this edge case, which I think is reasonable.
WDYT @mvachon ?