user2062360
user2062360

Reputation: 1523

How do I find the real user who pushed a commit in gitlab?

Is there a way to find out who pushed a particular commit to gitlab - In the commit log (I see the author set via the git client config) , I instead want to see which gitlab user's authentication was used to PUSH that code ?

PS: There are multiple git specific questions asked and there was no solution provided in the previous questions - want to see if gitlab has some specific implementation to solve this ?

Upvotes: 9

Views: 2416

Answers (3)

VonC
VonC

Reputation: 1324347

2018: I answered "no" 5 years ago, but GitLab offers audit logs of its own: As mentioned here HTTP and SSH requests are logged in different files:

However, that won't give you the SHA1(s) pushed, only the push event date and IP: you still need to cross-reference that with a commit date, to get an idea of who did push a given commit.


GitLab 14.9 (March 2022) seems to include push events (but for Premium/Ultimate editions only):

New audit events

The GitLab 14.9 release adds support for auditing the following activities:

  • Creating a new merge request approval rule.
  • Deleting a merge request approval rule.
  • Approving a merge request. (Supported as streaming audit events only.)
  • Creating, deleting, or revoking a project or group deploy token.
  • Failed attempts to create a project or group deploy token.
  • Authenticated git push or git pull commands to a private repository performed over either SSH or HTTPS (Supported as streaming audit events only.)

See Documentation and Issue.

Upvotes: 6

Bill LaLonde
Bill LaLonde

Reputation: 48

because of the confusing nature of your question, I am only able to provide simple answers. If what you are asking is to see what authentication a particular user has used to PUSH a commit then you should be able to find it based on the remote URL for the repo. If you are looking to find out who did a specific commit, you can search for it in the Web UI.

Hope this helps, reach out if you have additional questions.

Upvotes: -2

Rajana Deepak
Rajana Deepak

Reputation: 1392

Only commit status can be known. But person who actually pushed cannot be known.

Upvotes: 1

Related Questions