The git password of sourcetree exists in the keychain of mac, you need to delete the corresponding information in the keychain, and opening it again will let you re-enter the password, and the problem is solved.
See: https://stackoverflow.com/questions/20953940/authentication-failed-to-bitbucket