Issue #3033 invalid

Pushing to bitbucket: authorization failed

Marius Butuc
created an issue

I'm new to mercurial & bitbucket (coming from git & github) 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://mariusbutuc@bitbucket.org/DB2UAdmin/repo http authorization required realm: Bitbucket.org HTTP user: mariusbutuc password: pushing to https://mariusbutuc@bitbucket.org/DB2UAdmin/repo searching for changes abort: authorization failed }}}

==== SSH ==== {{{ $ hg push ssh://hg@bitbucket.org/DB2UAdmin/repo pushing to ssh://hg@bitbucket.org/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.

Extra details: python 2.7.1+ mercurial 1.7.5 * on Ubuntu 11.04

==== How can I get it to work? ====

Comments (12)

  1. Mehmet Catalbas

    Hi Marius,

    I've just tried pushing to a new repository and it works fine.

    Are you sure you have write access to the repo which DB2UAdmin owns? You need to have write privileges to push to a repo.

  2. Marius Butuc reporter
    • changed status to open

    Hi Mehmet, thanks for your answer!

    Here is my scenario:

    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://hg@bitbucket.org/DB2UAdmin/repo
    pushing to ssh://hg@bitbucket.org/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!

    Imho, this is at least a flaw in the way the user experience was designed...

  3. Mehmet Catalbas

    Hi Marius,

    As I said earlier, pushing via HTTPS and SSH is working fine. Have you tried pushing via HTTPS after you were granted admin access to the repo that DB2UAdmin owns?

    I'll close this ticket as invalid as we're unable to reproduce this problem, please don't hesitate to reopen it if you're still having issues.

  4. Aubrey Portwood

    Okay, I am ssh'd into another server (mediatemple.net) and it has mercurial installed on it. I am trying to do a hg pull to do an hg up to deploy a repo I have. I use HTTPS and login with my creds that work on my local machine when I do a pull. Why am I getting an abort permission denied. I even generated an SSH key on the server (mediatemple.net) and put that key into my accounts SSH keys. Still no go?

    Note: a pull via ssh worked. But I still like https method better

  5. hkalic

    Hi.

    I had exactly the same problem. Eventualy I tried to re-apply my public ssh key to my BitBucket account and then I got error that that key is allready used for something (can't remember what).

    After that i created new public key and replaced it with old one and now all is good - no more "pretxnchangegroup.bb_perm hook failed".

  6. Marcus Bertrand staff

    Hello, we haven't had any similar reports. If you are having trouble pushing, please raise a support request directly to the team at support@bitbucket.org and we'll address any specific issues you may be having.

  7. Log in to comment