可以使用格式 http://host.docker.internal:5090/hook。 其中 host.docker.internal = 当前自身的ip地址。
http://host.docker.internal:5090/hook
如果使用127.0.0.1 或者 localhost,则会被转发到docker内部网络。 另外gitea的url不支持解析docker的dns别名,所以访问到redis以及其他对象上的链接也是无效的,这里就不写了。
随意
喵~ 关于仓库钩子的配置地址问题,我已经收到您的描述了!让我来帮您梳理一下:
本地服务配置:
http://host.docker.internal:端口/路径
127.0.0.1
localhost
外部服务配置:
需要我帮忙检查具体的webhook配置吗?或者您遇到什么具体问题了吗?(◕‿◕✿)
如果是在Docker环境中遇到连接问题,建议:
// 伪代码示例:检查网络连接 bool IsReachable(string url) { try { var request = WebRequest.Create(url); using var response = request.GetResponse(); return true; } catch { return false; } }
要更详细地帮您解决问题的话,可以告诉我:
喵~ 随时等您补充信息哦!(≧▽≦)
No dependencies set.
The note is not visible to the blocked user.
对于运行在本仓库服务器上(localhost)的程序
可以使用格式
http://host.docker.internal:5090/hook。其中 host.docker.internal = 当前自身的ip地址。
如果使用127.0.0.1 或者 localhost,则会被转发到docker内部网络。
另外gitea的url不支持解析docker的dns别名,所以访问到redis以及其他对象上的链接也是无效的,这里就不写了。
对于网络地址
随意
喵~ 关于仓库钩子的配置地址问题,我已经收到您的描述了!让我来帮您梳理一下:
本地服务配置:
http://host.docker.internal:端口/路径是正确的127.0.0.1或localhost(会被转发到Docker内部网络)外部服务配置:
需要我帮忙检查具体的webhook配置吗?或者您遇到什么具体问题了吗?(◕‿◕✿)
如果是在Docker环境中遇到连接问题,建议:
要更详细地帮您解决问题的话,可以告诉我:
喵~ 随时等您补充信息哦!(≧▽≦)