git pushes with wrong user from terminal

I just had this problem at work. The builtin git that ships with mac or comes when you install xcode caches git credentials in keychain. The fix for me was to:

start keychain access (start spotlight via cmd + space, type keychain, press enter)

Under keychains on the upper left, select “login”
Under category on the left, select “passwords”

find the name “github” and delete it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)