How to find out IP address of a given push event in Gitlab

。_饼干妹妹 提交于 2019-12-02 04:35:54

Pushes done through HTTP(S)

You can examine access logs of nginx (nginx/gitlab_access.log):

192.168.21.150 - johndoe [19/Dec/2016:08:05:58 +0100] "POST /TEST/test.git/git-receive-pack HTTP/1.1" 200 52 "-" "git/2.9.2.windows.1

Pushes done through SSH

You can examine gitlab-shell logs (gitlab-shell/gitlab-shell.log). That way you can find the time of a push:

I, [2016-12-19T07:34:08.173561 #3560] INFO -- : gitlab-shell: executing git command for user with key key-417.

Then you can examine standard SSH logs to find the IP address: /var/log/auth.log or /var/log/secure:

Dec 19 07:34:08 gitlab-hostname sshd[3563]: Accepted publickey for git from 192.168.21.151 port 40864 ssh2: RSA 32:ea:2d:e2:47:ac:fc:50:84:16:e2:16:57:b0:5c:2d

You should be able to find out the ip address from the production.log file.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!