You don't need to use the built-in SCM to resolve this issue. Instead, try adding the public key fingerprints to Xcode’s internal fingerprint store in com.apple.dt.Xcode.plist under IDESourceControlModernKnownSSHHostsDefaultsKey. You’ll need a different public key fingerprint for each remote repository service.
For example, do the following to add Github's SSH key fingerprint:
# Quit Xcode first
$ defaults write com.apple.dt.Xcode IDESourceControlModernKnownSSHHostsDefaultsKey -dict \
github.com "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"
# Confirm the entry was added
$ defaults read com.apple.dt.Xcode IDESourceControlModernKnownSSHHostsDefaultsKey
{
"github.com" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
}
IDESourceControlModernKnownSSHHostsDefaultsKey is stored as a dictionary in
com.apple.dt.Xcode.plist. Entries are host -> string, where the string is an OpenSSH known-host style value (<algorithm> <base64-key>), e.g. ssh-ed25519 AAAA....
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: