I have a problem with macOS keychain:
I'm using SourceTree app for GitHub projects.
when I push the project, everything is fine but SourceTree wants me to login with github account for push, so I logged in, but there is come error for username or password: I accidently type wrong username, but Apple already stored keychain for this.
I just go to keychain app delete the stored keychain for github then just opened the SourceTree, and still I'm getting the wrong username.
How can I delete the wrong username?
You should be able to erase that keychain entry:
from the Keychain GUI (as seen in "Updating credentials from the macOS Keychain")
or in command line with:
printf "protocol=https\nhost=github.com"|git credential-osxkeychain erase
Repeat the last command until it asks you for a username/password.
Check also your git remote -v (in the folder of your local repository) to ensure that the origin
remote URL is:
https://
)https://[email protected]/...
)The OP seyfzone adds that SourceTree itself has the account:
SourceTree > Preferences > Advanced > Delete Account