I should add that I have two-factor authentication (2FA) enabled for both my GitHub and Bitbucket accounts. I had no problem adding a GitHub account, but Bitbucket was more of a struggle.
I prefer to use a separate Git client, but the support for Swift packages in Xcode 11 made me want to try the integration again. Xcode has supported adding your GitHub account since Xcode 9 and Bitbucket accounts since Xcode 10.