每次尝试推送时,我都会得到这样的结果。 我尝试强行推入,变基,初始化无济于事。
nayananga@nayananga-Aspire-E5-575G:/opt/lampp/htdocs/registration$ git push 'https://nayanangamuhandiram@bitbucket.org/group4suoj2016/version-1.0.git' 'nayananga`s_branch' Password for 'https://nayanangamuhandiram@bitbucket.org': Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (5/5), 1.02 KiB | 1.02 MiB/s, done. Total 5 (delta 0), reused 0 (delta 0) remote: remote: One of your commit messages is missing a valid issue key: remote: remote: 3517c56: CompleteUserRegistrationUsingPhpAndMysqlDatabase remote: remote: For more information, see https://confluence.atlassian.com/x/ZwjoE. remote: To https://bitbucket.org/group4suoj2016/version-1.0.git ! [remote rejected] nayananga`s_branch -> nayananga`s_branch (pre-receive hook declined) error: failed to push some refs to 'https://nayanangamuhandiram@bitbucket.org/group4suoj2016/version-1.0.git'
有什么帮助吗?
nayananga@nayananga-Aspire-E5-575G:/opt/lampp/htdocs/registration$ git push origin 'nayananga`s_branch' Password for 'https://nayanangamuhandiram@bitbucket.org': Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (5/5), 1.02 KiB | 1.02 MiB/s, done. Total 5 (delta 0), reused 0 (delta 0) remote: remote: One of your commit messages is missing a valid issue key: remote: remote: 3517c56: CompleteUserRegistrationUsingPhpAndMysqlDatabase remote: remote: For more information, see https://confluence.atlassian.com/x/ZwjoE. remote: To https://bitbucket.org/group4suoj2016/version-1.0.git ! [remote rejected] nayananga`s_branch -> nayananga`s_branch (pre-receive hook declined) error: failed to push some refs to 'https://nayanangamuhandiram@bitbucket.org/group4suoj2016/version-1.0.git'
@tim
nayananga@nayananga-Aspire-E5-575G:/opt/lampp/htdocs/registration$ git push origin master Password for 'https://nayanangamuhandiram@bitbucket.org': Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (5/5), 1.02 KiB | 1.02 MiB/s, done. Total 5 (delta 0), reused 0 (delta 0) remote: remote: One of your commit messages is missing a valid issue key: remote: remote: 6cfab63: CompleteUserRegistrationUsingPhpAndMysqlDatabase remote: remote: For more information, see https://confluence.atlassian.com/x/ZwjoE. remote: To https://bitbucket.org/group4suoj2016/version-1.0.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://nayanangamuhandiram@bitbucket.org/group4suoj2016/version-1.0.git'
@R
答案 0 :(得分:2)
花了很多时间之后我找到了解决方案。我将解决方案发布在这里
我们收到的报告是,某些客户在尝试推送时收到“预接收钩拒绝”错误。我们正在调查。 如果您遇到此问题,有一个解决方法。作为存储库管理员,您可以转到存储库设置->“链接”部分。然后禁用“在提交消息中要求发布密钥”。 发表约2个月前。 2018年7月9日-世界标准时间10:52 https://status.bitbucket.org/incidents/j71s01py6mb6
希望它将对他人有帮助
答案 1 :(得分:2)
需要在 GIT 提交 <-> JIRA 票证之间创建链接,因此在提交消息中包含 JIRA 票证 ID。 示例:如果 JIRA 票证 ID 为“PD-0707”,则您提交的消息应如下所示。
git commit -m "PD-0707 解决 GIT 密钥问题"
答案 2 :(得分:0)
就我而言,我曾经提交过我的代码,但消息中没有“ Issue Key”,但是在遇到该问题后,我再次提交了“ Issue Key”,但仍然收到相同的错误消息。
所以解决方案是
首先通过以下命令检查所有提交日志:
git log
通过以上命令,您将获得提交日志列表。从列表中,您可以通过执行以下命令来删除最近的提交(警告:如果不确定,不要在不进行备份的情况下删除提交,
git reset --soft HEAD~1
它删除了没有附加“ Issue Key”的提交。然后我再次提交并按如下所示推送我的代码:
git add .
git commit -m"XXXXX-504: my message"
git push
对我有用。