推送到bitbucket:授权失败
我是一个git &刚接触 Mercurial 的 github 用户bitbucket,我正在尝试将 bitbucket 用于项目。
到目前为止,我已经获得了对新的私有 bitbucket存储库的写入权限,并且我开始:
- 克隆
- 添加我现有的项目
- 提交
- 尝试推送,我通过以下方式得到
授权失败
:
HTTPS
$ hg push https://[email protected]/DB2UAdmin/repo http authorization required realm: Bitbucket.org HTTP user: mariusbutuc password: pushing to https://[email protected]/DB2UAdmin/repo searching for changes abort: authorization failed
SSH
$ hg push ssh://[email protected]/DB2UAdmin/repo pushing to ssh://[email protected]/DB2UAdmin/repo searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 9664 changes to 9664 files remote: You're not allowed to write to this repository. remote: transaction abort! remote: rollback completed remote: abort: pretxnchangegroup.bb_perm hook failed
也通过简单的HTTP尝试,得到了类似的结果与HTTPS。
我怎样才能让它发挥作用?
额外详细信息:
- python 2.7.1+
- Mercurial 1.7.5
- Ubuntu 11.04 上的
I'm a git & github user that's new to mercurial & bitbucket and I'm trying to use bitbucket for a project.
So far I've got write access to a new private bitbucket repository, and I got started by:
- cloning
- adding my existing project
- committing
- trying push, I get
authorization failed
via:
HTTPS
$ hg push https://[email protected]/DB2UAdmin/repo http authorization required realm: Bitbucket.org HTTP user: mariusbutuc password: pushing to https://[email protected]/DB2UAdmin/repo searching for changes abort: authorization failed
SSH
$ hg push ssh://[email protected]/DB2UAdmin/repo pushing to ssh://[email protected]/DB2UAdmin/repo searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 9664 changes to 9664 files remote: You're not allowed to write to this repository. remote: transaction abort! remote: rollback completed remote: abort: pretxnchangegroup.bb_perm hook failed
also attempted via simple HTTP, got similar results as with HTTPS.
How can I get it to work?
Extra details:
- python 2.7.1+
- mercurial 1.7.5
- on Ubuntu 11.04
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
...我仍然无法通过身份验证测试。
必须撤销我自己的访问权限,才能
我仍然不知道为什么通过 HTTPS [用户名/密码] 推送失败!
...I still couldn't pass the auth test.
Had to revoke my own access, just to be able to
I still have no idea why pushing via HTTPS [username/password] failed!
对于那些通过谷歌搜索“pretxnchangegroup.bb_perm hook failed”到达这里的人,这可能是由于尝试合并到您在 bitbucket 上的“分支权限”下没有“写入”权限的分支而导致的。
据推测,这是因为您应该使用拉取请求进行合并,而不是继续在本地进行合并。
For those of you that arrive here from googling "pretxnchangegroup.bb_perm hook failed" this can be caused by trying to merge to a branch that you do not have the "write" permission under "branch permissions" on bitbucket.
Presumably this is because you should have used a pull request for the merge rather than going ahead and merging on your local.