Ole*_*leg 6 git commit bitbucket-server
昨天,当我尝试将提交提交回购时,我开始收到错误,该如何解决?我不是这个仓库的管理员。
remote: You can only push your own commits in this repository
remote: Commit commitName was committed by <myName> <my@users.noreply.github.com>
To ssh://bitbucket.awg.ru/repo
! [remote rejected] branchName -> branchName (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@bitbucket.awg.ru/repo'
Run Code Online (Sandbox Code Playgroud)
谢谢大家,问题解决了。问题出在Bitbucket方面,管理员更改了一些选项。现在一切正常。
mah*_*ara 11
如果设置user.email和user.name后问题仍然存在?您可能需要更改提交作者日志以与该用户匹配。只需在 cmd 下运行之前检查 git 日志即可。
git commit --amend --reset-author --no-edit
Run Code Online (Sandbox Code Playgroud)
谢谢大家,问题解决了。问题出在Bitbucket方面,管理员更改了一些选项。现在一切正常。
更新
按照@Oleg的问题。通常由于Bitbucket挂钩而发生问题。该挂钩将拒绝任何包含未推送到服务器的用户提交的提交的推送。
解决问题:
小智 5
您需要先设置标识,然后再将其推送到bitbucket
git config --global user.email "Your Email"
git config --global user.name "Your Name"
git push origin <branch-name>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7564 次 |
| 最近记录: |