删除Sourcetree 缓存文件(只需要删密码文件),文件位置: Mac: ~/Library/Application Support/SourceTree Windows: C:UsersUSERNAMEAppDataLocalAtlassianSourceTree
删除后 拉取原用户的code 会告诉你 填写密码,填写完即可
如果觉得我写的不清楚,或者没有解决你的问题 那么可以看看这个
https://community.atlassian.com/t5/Sourcetree-questions/How-to-update-HTTP-S-credentials-in-sourcetree/qaq-p/297564