Xcode Cloud + Cocoapods - Failing inconsistently

Hey there, everybody

Having a difficult time getting app to consistently build on Xcode Cloud due to several errors in ci_post_clone.sh

I'm not trying to do anything amazing other than:

brew install cocoapods
pod install

Here are some of the errors that occur. Sometimes the build succeeds! More often than not, it fails for unknown reasons.

  1. "Couldn't determine repo type for URL: https://github.com/CocoaPods/Specs.git"
[!] Couldn't determine repo type for URL: `https://github.com/CocoaPods/Specs.git`: Failed to open TCP connection to github.com:443 (Connection reset by peer - connect(2) for "github.com" port 443)
  1. Failed to download libyaml (dependency of cocoapods)
curl: (7) Failed to connect to ghcr.io port 443 after 3 ms: Couldn't connect to server
Error: libyaml: Failed to download resource "libyaml"

Have tried:

  1. unlinking/uninstalling cocoapods and re-installing:
brew update
brew uninstall cocoapods
#issue https://github.com/facebook/react-native/issues/42698
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/1364b74ebeedb2eab300d62c99e12f2a6f344277/Formula/c/cocoapods.rb > cocoapods.rb
brew install cocoapods.rb
brew link --overwrite cocoapods
  1. Installing libyaml independently of cocoapods:
brew install libyaml
brew install cocoapods  
  1. Installing with gem/bundler
  2. Add source to Podfile
source 'https://github.com/CocoaPods/Specs.git'
  1. adding export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
  2. pod repo update before pod install

Any insight? Anybody else seeing this behavior? Thank you!

Replies

BTW, Posting this here because this happens exclusively from Xcode Cloud