Git 推送被拒绝:在提交消息中未找到JIRA问题。分支名称(预接收挂钩已拒绝)错误:无法将某些引用推送到http://bitbucket.com

Git 推送被拒绝:在提交消息中未找到JIRA问题。分支名称(预接收挂钩已拒绝)错误:无法将某些引用推送到http://bitbucket.com,git,bitbucket,jira,Git,Bitbucket,Jira,我试图将我的提交推送到bitbucket,在提交消息中发现一个错误push Rejected No JIRA Issue 我修改了提交消息以匹配Jira票证,但仍然收到相同的错误: remote: remote:remote: Push rejected. remote: remote: refs/heads/feature/JR-2923: df323hfsdfw3u23u : No JIRA Issue found in commit message. remote: To http://b

我试图将我的提交推送到bitbucket,在提交消息中发现一个错误push Rejected No JIRA Issue

我修改了提交消息以匹配Jira票证,但仍然收到相同的错误:

remote:
remote:remote: Push rejected.
remote:
remote: refs/heads/feature/JR-2923: df323hfsdfw3u23u : No JIRA Issue found in commit message.
remote:
To http://bitbucket/repo/name
 ! [remote rejected] feature/JR-2923 -> feature/JR-2923 (pre-receive hook declined)
error: failed to push some refs to 'http://user@http://bitbucket/repo/name'

您报告了类似的问题,如(假设您正在使用):

  • :检查您的正则表达式,以及您的身份验证
例如,在正则表达式方面:

实际上,我认为问题可能是在提交消息regex中使用了组。
如果我改变:

^[([A-Z]+)-(\d+)](.|\n)+

^([[A-Z]+-\d+])(.|\n)+
然后该组现在是([PROJNAME-1234]),而不是[(PROJNAME)-(1234)]

在认证方面:

如果问题确实存在,并且手动测试时JQL
issueKey=CM-933
起作用,那么这感觉像是权限问题,因为如果用户没有查看权限,您将看到空结果,并且YACC抱怨它找不到问题

在典型设置中,通信如下所示:

browser <--\        browser <--\
           |                   |
git <----> BBS <-- oauth --> JIRA

browser我在邮件中添加了双引号,效果很好。

git commit-m“关于问题的消息”

您是如何修改提交消息的?谁控制Bitbucket服务器实例上的预接收脚本?要修改提交消息,我在vi编辑器中使用git commit--amend and modify。因此,提交消息是关键,正如我在回答中提到的。向上投票。