I have a problem with git and my terminal.
Here is a gallery to show you my problem: http://imgur.com/a/6RrEY
When I click on my terminal, git says that I click on them with a different username, that the user from my organization (my company) is without committing at all and it seems that he doesn’t belong to anyone: (check the pic gallery first)
But this does not happen when I use Github for mac, in the feed I see that the commits I made.
The problem also affects my personal repositories, my terminal says that I don’t have permission to impose commits on these repositories (which is obviously wrong), because it is trying to push it with this user: (check gallery second pic.)
Guess what? This does not happen with github for mac either.
I redid my computer to a new one a few days ago, so I reset 'created all my github ssh key and left only the new one created by Github for Mac, so I don’t think that there is some kind of ghost user key / ssh hidden somewhere- then this hdd is brand new: (check the gallery of the third picture)
My .gitconfig file is clear, it only has my credentials: (check gallery fourth pic.)
I really don't understand, help, StackOverflow, you are the only hope.
(My apologies for my poor Gimp skills and a link to Star Wars)
EDIT: ssh-add -l only shows a good ssh key generated by github for mac and I only have one github account
EDIT2: ssh -T git@github.com recognize me as a good user.
EDIT3: After several tests, it looks like my terminal does with my username, but pushes them to others, Github for mac commits and pushes with a good username. This situation happens with every i / make repo (even new ones).
EDIT4: My git log --pretty="%h %an %ae" personal repository shows my good username
EDIT5: No sign of environment variables that would override my credentials in my env . Even if I try to set these variables with a good account, the problem persists.
EDIT6: Everything works fine if I force the user to the /.git/config repository path, but I don't think a good option: http://USER@github.com/USER/REPO.git
EDIT7: We removed the git user who moved the commits for me, and this causes another error: remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/USER/REPO.git/' remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/USER/REPO.git/'
FINAL EDIT: I installed git using homebrew, typed git config --global push.default simple , and now it accepts my credentials even without forcing the user. This is strange. Thank you all for your help, you are great guys!