Add SSH Access key, unable to push with original key

Rob Nieuwenhuizen May 31, 2018

I have a repository with my personal SSH key setup, this all works fine.

Then I have created an extra SSH key (on a different host) and add this SSH key to 'Access keys'. Now I am able to pull the repository to this new host. Until here everything works as expected.

But now I am unable to push from my local computer.

$ hg push
pushing to ssh://hg@bitbucket.org/XXXXXXX/XXXXX
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 2 changesets with 1 changes to 1 files
remote: repository access denied. access via a deployment key is read-only.
remote: transaction abort!
remote: rollback completed
remote: pretxnchangegroup.bb_perm hook failed
abort: push failed on remote

 

 

1 answer

0 votes
jyo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2018

Hi Rob,

If your access key is loaded on the machine you're trying to push with, it won't work. That access key is read only, so you'd need to add a different key under Settings > SSH keys for something that is read/write.

Jesse

Rob Nieuwenhuizen June 1, 2018

Hi Jesse, thank you for the answer but I think that my message was not clear enough..

 

I have a laptop with a "Normal" SSH key, for push and pull. This works for a few years already.

 

Now I add a Access key so I can pull my repository on a different computer. This also works as expected. I do not want to push with the Access key, I know it is a read only key, and that's exactly what I want. 

 

But the issue is, as soon as I add the Access key, I can not push with my "Normal" SSH key. There is nothing changed on my laptop. And as soon as I remove the Access key I can push again..

 

Kind regards, Rob

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events