Repository access denied. access via a deployment key is read-only
First confusion on my side was about where exactly to set SSH Keys in BitBucket.
I am new to BitBucket and I was setting a Deployment Key which gives read-access only.
So make sure you are setting your rsa pub key
in your BitBucket Account Settings.
Click your BitBucket avatar and select Bitbucket Settings(Manage account). There you'll be able to set SSH Keys.
I simply deleted the Deployment Key, I don't need any for now. And it worked
Deployment keys are read only. To enable write access you need to:
Remove this deployment key from your repository settings. You won't be able to write to this repo with this key anyway.
Go to "Avatar -> Settings -> SSH Keys" and add the same key
Now try to push to remove branch
You were able to write to repositories before but this is a change in BitBucket where you're no longer able to write with deploy key.
Now the SSH option is under the security settings
Click Your Avatar --> Bitbucket Settings --> SSH Key --> Add Key
Paste your public key
you need to add your key to your profile and NOT to a specific repository. follow this: https://community.atlassian.com/t5/Bitbucket-questions/How-do-I-add-an-SSH-key-as-opposed-to-a-deployment-keys/qaq-p/413373