0
我得到了一个在Nginx上运行并正在运行的公共Gitlab安装,并且我想限制它对IP地址白名单的访问。通过IP与Nginx一起限制Gitlab访问
我一直在努力,在nginx的添加一个基本的限制是这样的:
location @gitlab {
allow 127.0.0.1;
allow XXX.XXX.XXX.XXX;
deny all;
...
}
它还挺工作方式只允许IP地址可以通过gitlab的Web界面得到。 但是,当涉及到这些IP地址允许推的东西,我得到这个错误:
Pushing to http://my.server:port/myrepo.git
POST git-receive-pack (451 bytes)
remote: GitLab: API is not accesible
To http://my.server:port/myrepo.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://my.server:port/myrepo.git'
奇怪。我也尝试使用ngx_http_geo_module,结果相同。 有人可以知道如何做到这一点?
感谢