推送到bitbucket:授权失败

发布于 2024-12-05 22:22:25 字数 1766 浏览 2 评论 0原文

我是一个git &刚接触 Mercurial 的 github 用户bitbucket,我正在尝试将 bitbucket 用于项目。

到目前为止,我已经获得了对新的私有 bitbucket存储库的写入权限,并且我开始

  1. 克隆
  2. 添加我现有的项目
  3. 提交
  4. 尝试推送,我通过以下方式得到授权失败

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:

  1. cloning
  2. adding my existing project
  3. committing
  4. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

赴月观长安 2024-12-12 22:22:25
  1. bitbucket 帐户是在我的 gmail 地址 [addr A] 下开设的。
  2. SSH 密钥是使用我公司 [addr B] 的地址创建的。
  3. addr B 已作为辅助地址添加到我的帐户中。
  4. 我对 mariusbutuc 帐户具有写入权限,该帐户有两个地址。

...我仍然无法通过身份验证测试。

  1. 收到了管理员的邀请,地址为我的工作地址 - 地址 B。有了管理员权限,不仅仅是写。
  2. 我试图接受邀请,但无法:我的帐户已经有权访问存储库。
    必须撤销我自己的访问权限,才能
  3. 接受管理员权限。
  4. 通过 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: bb/acl: mariusbutuc is allowed. accepted payload.

我仍然不知道为什么通过 HTTPS [用户名/密码] 推送失败!

  1. The bitbucket account was opened under my gmail address [addr A].
  2. The SSH key was made using the address from my company [addr B].
  3. addr B was added to my account as a secondary address.
  4. I had writing access for the mariusbutuc account, that had both addresses.

...I still couldn't pass the auth test.

  1. Got an invitation form the Admin, on my work address - addr B. With admin rights, not only write.
  2. Trying to accept the invitation, I couldn't: my account already had access to the repository.
    Had to revoke my own access, just to be able to
  3. accept the admin rights.
  4. Pushed successfully via 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: bb/acl: mariusbutuc is allowed. accepted payload.

I still have no idea why pushing via HTTPS [username/password] failed!

活雷疯 2024-12-12 22:22:25

对于那些通过谷歌搜索“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文