Trying to push to BitBucket but I get "master conq: repository access denied." "fatal: The remote end hung up unexpectedly"

bitbucket, git

Solution

In term of ssh access (like an ssh BitBucket repo address similar to `ssh://git@bitbucket.org/accountname/reponame.git`, double-check:

- the help page "Using the SSH protocol with bitbucket" and "troubleshooting SSH Issues for bitbucket"

- the case used in your address (case-sensitive)

- the nature of your ssh key (is it password protected? Did you then nadd it to the ssh-agent?)

- the number of your ssh keys (if you have several keys, you need to declare them in a `~/.ssh/config` file, or you can follow this answer)

Note: on Windows, then environment variable `HOME` isn't defined by default. Make sure it is.

Problem

I'm doing like this to push changes my bitbucket repository: ``` $: git push origin master conq: repository access denied. fatal: The remote end hung up unexpectedly ``` What does this error mean and how do I fix it? Debug info for bitbucket: `ssh -T -v git@bitbucket.org` ``` OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to bitbucket.org [131.103.20.167] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/identity-cert type -1 debug1: identity file /root/.ssh/id_rsa type 1 debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'bitbucket.org' is known and matches the RSA host key. debug1: Found key in /root/.ssh/known_hosts:5 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug1: Offering public key: /root/.ssh/id_rsa debug1: Remote: Forced command: conq deploykey:435246 debug1: Remote: Port forwarding disabled. debug1: Remote: X11 forwarding disabled. debug1: Remote: Agent forwarding disabled. debug1: Remote: Pty allocation disabled. debug1: Server accepts key: pkalg ssh-rsa blen 277 debug1: read PEM private key done: type RSA debug1: Remote: Forced command: conq deploykey:435246 debug1: Remote: Port forwarding disabled. debug1: Remote: X11 forwarding disabled. debug1: Remote: Agent forwarding disabled. debug1: Remote: Pty allocation disabled. debug1: Authentication succeeded (publickey). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LANG = en_US.UTF-8 authenticated via agent_smith. You can use git or hg to connect to Bitbucket. Shell access is disabled. This deploy key has read access to the following repositories: myserver/scripts: root@myserver.stuff.com -- root@myserver.stuff.com debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug1: channel 0: free: client-session, nchannels 1 Transferred: sent 2440, received 3032 bytes, in 0.0 seconds Bytes per second: sent 58903.0, received 73194.2 debug1: Exit status 0 ``` It's some problem that has to do with the authenticated user `agent_smith` above.

Original source

Related problems