I tried setting up two-factor authentication on my Bitbucket account and it said I needed to configure SSH. So I did but I'm having problems getting it to work with Sourcetree (2.7.4 174 for macOS 10.13.4 17E202, git version 2.15.1 Apple Git-101)
- I generated a key in Sourcetree using these steps
- I copied the SSH key to Bitbucket in my online settings
- I followed SSH troubleshooting instructions here
It seemed to work initially, but when I try to refresh remote repositories in Sourcetree it says:

(note with SSH there is no spot for an app password…)
And when I try to edit my account authentication settings in Sourcetree and click save, now it always says:

Edit:
I just tried switching back to HTTPS, putting in a new app password from Bitbucket, and then saving, then going back to SSH and then so far it seems to work… but that doesn't really make much sense.