github服务挂钩和基本身份验证

Bri*_*gle 10 github webhooks git-post-receive

我正在试图弄清楚如何为github服务挂钩保护webhook接收器.

在github手册页中,当您查看github钩子将来自哪个IP地址的部分时,它会出现以下警告:

"我们强烈建议您不要使用Service Hooks的白名单IP.而是设置HTTPS和基本身份验证来验证传入请求."

在关于post post hooks的文档中,我没有看到任何设置基本身份验证的方法.

如何通过github post-recieve/service/web hook使用基本身份验证,通知我提交到存储库?

Ax3*_*x3l 15

我想你可以用

https://yourUser:yourSecret@yoursite.net/path
Run Code Online (Sandbox Code Playgroud)

像在任何基本的身份验证情况.

我明天也会尝试一下:) https://github.com/blog/237-basic-auth-post-receives