侧边栏壁纸
  • 累计撰写 84 篇文章
  • 累计创建 34 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

GitLab webhook触发Kubesphere Devops报错403未授权

欧泡果奶
2025-01-15 / 0 评论 / 0 点赞 / 4 阅读 / 0 字

GitLab触发webhook时报错,以下为报错信息:

{
   "apiVersion": "v1",
   "code": 403,
   "details": {
      "group": "devops.kubesphere.io",
      "kind": "webhook",
      "name": "git"
   },
   "kind": "Status",
   "message": "webhook.devops.kubesphere.io \"git\" is forbidden: User \"system:anonymous\" cannot create resource \"webhook\" in API group \"devops.kubesphere.io\" at the cluster scope",
   "metadata": {},
   "reason": "Forbidden",
   "status": "Failure"
}

原因:anonymous匿名用户没有webhook的权限,需要给匿名用户加上对应的角色

执行以下命令:

kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/refs/heads/master/roles/ks-core/prepare/files/ks-init/role-templates.yaml

角色

0

评论区