Hello! I believe I've found a quirk with how "private" submodules are resolved in swift packages. From what I've gathered, Xcode does not seem to respect my GitHub credentials when resolving private submodules. I have a few workarounds but I'd like to see if there's anything obvious that I'm missing or something that I'm misunderstanding, or if I should file a more formal feedback in feedback assistant.
Private package with no git submodules
I have a private package on my GitHub account. I can use this package as a dependency in my app so long as I've entered my GitHub username + personal access token (PAT) in Xcode's account settings window. If I remove this information, Xcode prompts me to add it again when resolving my packages.
This all falls in line with what I'd expect.
Private package with a private git submodule
I have another private package that also includes a git submodule. Xcode can successfully clone the package, but then fails to initialize the submodules with errors like this:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
If I manually clone the submodule directly on the command line once, Xcode is now able to successfully initialize my submodule when resolving my package. When I do the clone manually, I see a new password pop in to the Keychain Access app (I see it by filtering on "git"). As long as that's there Xcode can resolve my package; as soon as I delete it I get my original errors again.
This also works fine if I use an ssh url for my submodule rather than an https url (because I've got properly configured ssh keys, etc).
Both of these details lead me to believe that Xcode is not respecting my GitHub credentials that I've entered into its preference window when resolving submodules of packages, and is instead relying on my own environment as if it were me using the CLI manually.
These "workarounds" are totally acceptable for me personally, but as someone maintaining the app at my company, and specifically the "how to get going" section of our README, it causes a bit of trouble. I'd love to be able to keep it as "here's how to make a PAT in GitHub and add it to Xcode".