I am on mac OS unlike this post:
I have password conf
it worked for me: I use Mac and I wrote the path on finder:
~/Library/Application Support/SourceTree
I deleted the auth file which should be like
yourUserName@STAuth-gitlab.yourAdress
then tried to push and pull the code from the source tree and it worked.
You can also read the following answers:
https://community.atlassian.com/t5/Sourcetree-questions/How-to-update-HTTP-S-credentials-in-sourcetree/qaq-p/297564