Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I cannot push my new repo to bitbucket

francois777 August 12, 2018

I have created a new Bitbucket repo using the + sign on the left my my bitbucket account. Under General Settings I also copied my public ssh-rsa key. However, when I tried to push the master branch of my new repo:

git remote add origin git@bitbucket.org:francois777/nsw-explorer.git


git push -u origin master

the console printed this message:

[nsw-explorer] (master) $ git push -u origin master
repository access denied. access via a deployment key is read-only.

fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

My ssh-rsa key is listed in Settings/Access Keys. I do not have pipelines enabled. I have also created an alias to link my username, francois777, to my email address francoisvanderhoven@gmail.com. 

Can anyone help me to find out what I am doing wrong?

2 answers

0 votes
francois777 August 16, 2018

I have solved this problem by deleting my bitbucket ssh keys and the bitbucket repo. I then created a new ssh key on my account and created a new repo. I was then able to add my remote origin and push a branch to my bitbucket account.

0 votes
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 12, 2018

You added the key to the repo, but it needs to be on your account. Remove it from the repository first, and then add it to your account under Bitbucket settings > SSH keys.

francois777 August 13, 2018

Hi James,

Before I published my question above, I first enabled pipelines. I then added public and private ssh keys that I generated using ssh-keygen. This did not solve my problem. I have now deleted again the ssh keys from my repo and generated new ssh keys under Bitbucket settings > SSH keys. I still get the same output on my console with

ssh -T git@bitbucket.org

git@bitbucket.org: Permission denied (publickey).

Unfortunately I find the host address problematic because my public IP address is rejected as well as the IP address that I find under my network setting.

Can you please help me to overcome this obstacle?

Thanks,

Francois

francois777 August 14, 2018

Can anyone help me with this problem, please? Here is more diagnostic info from my console:

 $ ssh -v git@bitbucket.org

OpenSSH_7.6p1, LibreSSL 2.6.2

debug1: Reading configuration data /Users/francoisvanderhoven/.ssh/config

debug1: /Users/francoisvanderhoven/.ssh/config line 1: Applying options for *

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 48: Applying options for *

debug1: Connecting to bitbucket.org port 22.

debug1: Connection established.

debug1: identity file /Users/francoisvanderhoven/.ssh/id_rsa type 0

debug1: key_load_public: No such file or directory

debug1: identity file /Users/francoisvanderhoven/.ssh/id_rsa-cert type -1

debug1: Local version string SSH-2.0-OpenSSH_7.6

debug1: Remote protocol version 2.0, remote software version conker_1.1.11-210b09a app-134

debug1: no match: conker_1.1.11-210b09a app-134

debug1: Authenticating to bitbucket.org:22 as 'git'

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: algorithm: curve25519-sha256@libssh.org

debug1: kex: host key algorithm: ssh-rsa

debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none

debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none

debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A

debug1: Host 'bitbucket.org' is known and matches the RSA host key.

debug1: Found key in /Users/francoisvanderhoven/.ssh/known_hosts:3

debug1: rekey after 134217728 blocks

debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug1: SSH2_MSG_NEWKEYS received

debug1: rekey after 134217728 blocks

debug1: SSH2_MSG_SERVICE_ACCEPT received

debug1: Authentications that can continue: publickey

debug1: Next authentication method: publickey

debug1: Offering public key: RSA SHA256:JB6if1/R5ORFjcjttlDcthF4jCs/ezn8xjaslh9LBV8 /Users/francoisvanderhoven/.ssh/id_rsa

debug1: Authentications that can continue: publickey

debug1: No more authentication methods to try.

git@bitbucket.org: Permission denied (publickey).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events