git repo中有提交时,Github Webhook的codepileline不会触发 [英] Github webhook for codepileline not triggering when there is a commit in git repo

查看:111
本文介绍了git repo中有提交时,Github Webhook的codepileline不会触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立了一个aws代码管道,其中将Git用于存储库,并选择了GitHub webhooks作为更改检测模式.

I have set up an aws code pipeline where Git is used for the repository and have chosen GitHub webhooks as change detection mode.

当我通过单击发布更改"按钮手动触发管道时,该管道非常有用.

the pipeline works great when I manually trigger the pipeline by clicking on the Release change button.

但是,当我尝试提交然后将其推送到主设备中时,管道中没有任何活动. 我不确定git webhook是否正常工作,或者是否缺少任何其他配置.

But when I try a commit and then push into my mater there is no activity in the pipeline. I am not sure if the git webhook is working correctly or is there any additional configuration that I am missing.

我只是git枢纽上git存储库的用户.

I am just a user of the git repository which is on git hub.

有人可以暗示我想念的是什么吗?

Could anyone suggest what is that I am missing?

添加了令牌,还添加了repo和admin:repo,您​​可以看到它已被使用

Have added the token and also repo and admin:repo as you can see it showed it has been used

这是我的git repo:

This is my git repo :

您会在几分钟后看到提交.

as you can see there a commit a few minutes back.

这是管道的来源:

您可以看到,在过去的第18分钟内没有任何操作是手动触发的

As you can see there are no actions by it from past 18th min which was triggering it manually

当您单击GitHub链接时,该链接的来源指向存储库和相同的分支,并且还具有最新的提交信息(在git repo的图片中共享)

when you click the GitHub link that source it points to the repo and the same branch and also has the latest commit info (shared in the pic of git repo)

这是我得到的东西,看起来不错. [![在此处输入图片描述] [4]] [4]

here is the thing I get which seems to be good. [![enter image description here][4]][4]

但是我还可以看到git hub仓库上没有创建任何Webhook,我应该手动放置它吗?

But I could also see there is no webhook created on the git hub repo, Should I put it manually?

推荐答案

这可能归结为以下情况之一.

This likely comes down to one of the below scenarios.

第一种情况是,您的GitHub帐户中的权限配置不正确.查看文档以下权限必须附加到生成的令牌上:

The first scenario is that the permissions are not correctly configured within your GitHub account. Looking at the documentation the below permission must be attached to the generated token:

  • repo
  • admin:repo_hook
  • repo
  • admin:repo_hook

第二种情况是分支本身没有部署更改,非常重要的一点是指定的分支是接收更改的分支.如果该分支没有任何更改,则只有在发生更改之前,管道才会触发.

The second scenario is that the branch itself is not have changes deployed to it, its very important that the branch specified is the one receiving the changes. If this branch does not have any changes then the pipeline will not trigger until there are changes.

这篇关于git repo中有提交时,Github Webhook的codepileline不会触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆