天天看点

DevOps | gitlab使用webhook向jenkins发送请求,报错 Requests to the local network are not allowed

                     --昨夜西风凋碧树,独上高楼,望尽天涯路

gitlab 10.6 版本以后为了安全,不允许向本地网络发送webhook请求,如果想向本地网络发送webhook请求,则需要使用管理员帐号登录,默认管理员帐号是[email protected],密码就是你gitlab搭建好之后第一次输入的密码。官网解释

DevOps | gitlab使用webhook向jenkins发送请求,报错 Requests to the local network are not allowed

登录之后, 点击Configure Gitlab ,如下图所示:

DevOps | gitlab使用webhook向jenkins发送请求,报错 Requests to the local network are not allowed

即可进入Admin area,在Admin area中,在settings标签下面,找到OutBound Request,勾选上Allow requests to the local network from hooks and services ,保存:

DevOps | gitlab使用webhook向jenkins发送请求,报错 Requests to the local network are not allowed
DevOps | gitlab使用webhook向jenkins发送请求,报错 Requests to the local network are not allowed

现在OK了:

DevOps | gitlab使用webhook向jenkins发送请求,报错 Requests to the local network are not allowed