-2

I want to know whether or not some one run a 'git fetch' command on my repo. Could i check the git operations' history by some commands? Thanks.

1 Answers1

1

It depends where is located the repository accessed by "someone" for their git fetch.

If it is on-premise (your own machine, or servers you control/have access to), then you can at least modify the listeners (SSH or HTTPS) in order to record the IP address of that "someone" when the fetch query comes in.
A Git listener wrapper (both for SSH or HTTPS) like gitolite has a dedicated audit log folder.

But if it is in a server / repository hosting service, you might not have access to detailed audits, if at all:

A remote service API could give access to repository events, but those event types more likely include push (to measure contribution), more rarely pull/fetch.

As I mentioned here, you have ways to get the number of clones/download for a given repository, but not "who" exactly did clone/fetch a repository (again for remote Git repository hosting services like GitHub or GitLab).

Hence the importance to know more about the nature of the server where the Git repository is fetched from.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250