This blocks the CI because the dialog requires user interaction.
What is the correct way to completely disable Keychain access for GitHub credentials in a non-interactive CI environment while still using HTTPS authentication?
Has anyone solved this reliably for Fastlane/Xcode CI builds?
I already set the -scmProvider to system via xcodebuild
Don’t store GitHub credentials on CI machines, including in the macOS Keychain.
By default, Xcode and the macOS command-line tools may use git-credential-osxkeychain, which can cause Git to/Xcode to try to read credentials from the Keychain. On CI machines, I would remove that credential helper completely so the build never attempts to access Keychain-stored GitHub credentials.
Also, if possible, reset or recreate the macOS Keychain for each build. That way, the CI job cannot accidentally depend on credentials or other state left over from a previous run.
In short:
Do not store github.com credentials in the CI machine’s Keychain.
Remove git-credential-osxkeychain from the CI Git configuration.
Prefer ephemeral CI machines or reset the Keychain between builds.
You have to unlock keychain first. You can do it with either unlock_keychain action or following command sudo -u $LOCAL_USER_NAME security unlock-keychain -p "$CURRENT_LOCAL_USER_PASS". After that I recommend creation of temporary keychain via create_keychain action (remember to delete it at the end of job with delete_keychain ).