Reputation: 12660
I've recently introduced Git within my company. Git allows users to set their user.name and user.email to whatever value they wish. For auditing reasons, I need to know with certainty which TFS/Active Directory user pushed commits to the TFS on-premise server repository. Does TFS store this information somewhere? Or should I introduce signed commits instead?
Upvotes: 0
Views: 54
Reputation: 31023
What you are looking for is "pushedBy" field. When the user set the user.name and user.email, the "author" and "committer" will use the user.name, but the "pushedBy" still uses the TFS/Active Directory name.
Two ways to check the pushedBy user:
API:
GET http://tfsserver:8080/tfs/CollectionName/_apis/git/repositories/xxxxxxx/pushes/xxx?api-version=1.0
Upvotes: 2