Incorrect Tag Author?

Hopefully this is in the correct place, none of the other categories seemed to fit.

I recently added a tag to my repository for a computer science course. Initially, I created, committed and pushed the tag with the wrong date. I then overwrote the tag locally, deleted the tag from GitHub, and pushed my new tag. When I look at the tag however, it says that someone else added the tag, even though that person is not someone I know nor are they a contributor to the repo. Here is the tag in question:

Here is the relevant cli history:

1152 git tag -a hello-world -m “tagged for assignment due 20 Sep 2020”
1153 git push origin hello-world
1154 git tag
1155 git tag -a hello-world -m “tagged for assignment due 8 January 2021”
1156 git tag -f hello-world -m “tagged for assignment due 8 January 2021”
1157 git tag
1158 git push origin hello-world
1159 git push origin :refs/tags/hello-world
1160 git push origin hello-world

Anyone have any idea what happened here?

It looks like something’s wrong with your git settings, specifically the author name and mail. I’m not going to quote the full mail addresses here, but if you look at the commits (git log) and the tag details (git show hello-world) they are all of the form *-MacBook-Pro.local. You need to configure a mail address associated with your Github account as your author email to have them attributed correctly.

Here’s the documentation on how to do that:

1 Like

Awesome, thank you for your help! Future tags have me as the author now. Out of curiosity, is the reason Github gets confused because of my very generic admin@Admins-MacBook-Pro.local address?

is the reason Github gets confused because of my very generic admin@Admins-MacBook-Pro.local address?

Yes - you shouldn’t be using that if you want your commit history to be correctly attributed to you. If you want a private email for contributions, we have a guide for that:

2 Likes

I assume so. I’m not sure why it’d lead to the specific account it did (maybe they had the same issue and just added the generic address to their account?), but in general Github uses the author email to detect who wrote what. :slightly_smiling_face:

1 Like