如何知道有人在我的git repo上运行“ git fetch”?

我想知道是否有人在我的仓库上运行了“ git fetch”命令。 我可以通过一些命令检查git操作的历史吗?                                                                                         谢谢。

评论
  • 图门阳成
    图门阳成 回复

    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), 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.

    但是,如果它在服务器/存储库托管服务中,则可能根本无法访问详细的审核: