代码拉取完成,页面将自动刷新
同步操作将从 Holyhi/git-webhooks-server 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
./install.sh
进行安装.git clone https://github.com/troytse/git-webhooks-server.git
cd git-webhooks-server
./install.sh
cd git-webhooks-server
./install.sh --uninstal
# 匹配你的仓库全名
[your_name/repository]
# 工作目录
cwd=/path/to/your/repository
# 收到推送后执行的命令
cmd=git fetch --all & git reset --hard origin/master & git pull
systemctl restart git-webhooks-server
[custom]
# 用于识别来源
header_name=X-Custom-Header
header_value=Custom-Git-Hookshot
# 用于匹配 secret 的 header
header_token=X-Custom-Token
# 仓库名称在JSON请求数据中的位置
identifier_path=project.path_with_namespace
# 仅支持文本Token的认证
verify=True
secret=123456
application/json
或 application/x-www-form-urlencoded
格式的请求 (你可以参考 Github / Gitee / Gitlab 中关于请求的指引), 数据格式像这样:{
"project": {
"path_with_namespace": "your_name/repository"
}
}
/usr/local/etc/git-webhooks-server.ini
.[server]
address=0.0.0.0
port=6789
log_file=/var/log/git-webhooks-server.log
[ssl]
enable=False
key_file=/path/to/key.pem
cert_file=/path/to/cert.pem
[github]
verify=True
secret=123456
[gitee]
verify=True
secret=123456
[gitlab]
verify=True
secret=123456
[custom]
header_name=X-Custom-Header
header_value=Custom-Git-Hookshot
header_token=X-Custom-Token
identifier_path=project.path_with_namespace
verify=True
secret=123456
[your_name/repository]
cwd=/path/to/your/repository
cmd=git fetch --all & git reset --hard origin/master & git pull
[your_name/sample]
cwd=/path/to/sample
cmd=git fetch --all & git reset --hard origin/master & git pull
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。