Keep Getting Prompted for Password when 'Save to Keychain' is Selected
Problem
The password prompt appears despite the Save to Keychain option being selected.
Cause
Looking up a password in the keychain requires that the username is known in advance.
Resolution
Check whether your username is included in the URL, and if not, add it. The format will be something like:
https://username@host.com/path/to/repo
If the 'username@' part is omitted, SourceTree will still attempt to look up your password using a default username, but this doesn't always work, especially if you use different usernames for the same host in different contexts. Therefore, to be sure you should always include the username in the URL of any repositories you need to authenticate to access.