We are using the Swift Package Manager in some of our Xcode projects to integrate packages that live in other private repos of the organization. Everything works fine, except when we run builds on CI. Despite having the right Git configuration to authenticate successfully with our Git provider, the
xcodebuild process fails with the following error:
xcodebuild: error: Could not resolve package dependencies: Failed to clone repository https://github.com/foo/bar: Cloning into bare repository '/Users/anka/Library/Developer/Xcode/DerivedData/...'... fatal: could not read Username for 'https://github.com': terminal prompts disabled
After some reading, I found this blog post that mentions that HTTPS is not supported, and also noticed that Apple's official documentation mentions suggests to use SSH. Unfortunately, using SSH is not possible with GitHub apps, and the proxy solution suggested in the former post seems too much overhead.
Is there a way for xcodebuild's package resolution to successfully do authentication through HTTPS using the global git configuration?