varrix
varrix

Reputation: 41

IntelliJ committed to MY GitHub project with ANOTHER account

So I've been battling with IntelliJ 14 for hours trying to get it to allow me to commit/push/share my Java project to/with GitHub (public) but it has been more than aggravating. I finally had made some ground by (somehow) managing to get it to not only share my empty project to GitHub (creating a new one) but also committing and pushing a few files to it. Success!

I then go to check my project to see if the commit actually got pushed and huzzah! It did! Although, I can't help notice that it's well... NOT UNDER MY ACCOUNT?!?! Why... How... What even... I've never heard of the guy that is apparently the author of the commit. I don't share my computer, I have never used a similar name to him (oh by the way his name is KodekPL).

Project: https://github.com/loganspeck/eden Previous username: wingz

My IntelliJ GitHub settings have my account credentials "loganspeck". I'm at a loss as to how this even happened. Brand new fresh local repo, brand new fresh files, there's no way any lingering data from any copy and pasted files got in there because I wrote it all. Any advice would be greatly appreciated. Thank you in advance!

P.S: I normally never have issues with my GitLab repositories, nor did I have issues when I used Eclipse. I love IntelliJ and would prefer a solution over an alternative.

Upvotes: 1

Views: 1947

Answers (2)

Maxime Vaillancourt
Maxime Vaillancourt

Reputation: 31

I bet you play Minecraft. And you run your own server. Spigot perhaps? ;)

Upon further investigation, KodekPL's GitHub email address is "[email protected]". You probably have a Spigot MC server on your computer, and git picked that up as your email address, hence the wrong author on GitHub. :) Setting the global variables fixes this.

git config --global user.name "Your Name"
git config --global user.email [email protected]

Upvotes: 2

yole
yole

Reputation: 97268

When you commit to git, you specify the name and email address of the committer. There is no authentication; you don't need to have any password or any other data from that person.

Then, when you push to GitHub, it looks for a registered user that has the same email address, and shows the commit as performed by that user. Once again, no password of that user is required.

To make sure that your commits are reported as done by you, make sure that the email address configured in Git (git config --global user.email) matches the email address associated with your GitHub account.

Upvotes: 4

Related Questions