Like me, people who are not familiar with text-based Git usage will likely use SourceTree, a GUI-based Git management tool created by Atlassian.

https://www.sourcetreeapp.com/

However, while SourceTree is undoubtedly a great tool, small issues tend to occur frequently.

Today, I will share some content to check when you encounter an incorrect password issue while using SourceTree on a Windows environment.

First, GitHub has been using Personal Access Tokens instead of passwords since August 2021.
Setting -> Developer Settings -> Personal Access Tokens -> Tokens (Classic)

However, since personal access tokens typically have an expiration period, they must be renewed and used at regular intervals. If you forget to do this or forget that the token exists, you may encounter errors even if you frantically generate a new token later and re-enter it into SourceTree.

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin main:mainremote: Invalid username or password.

There are times when entering values through the account information input area of SourceTree, or even after receiving web authentication, the same error as above appears.

In this case, you must delete the log file stored locally and enter a new value.


Delete the C:\Users\사용자아이디\AppData\Local\Atlassian\SourceTree\passwd file.

And when you perform fetch again in SourceTree, a screen asking for your ID and password (token) appears, and you can proceed without an error message.