Repository access denied. Access via a deployment key is read-only.
An error occurred while submitting code locally to gitbucket:
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.
Principle Bitbucket has two places to set up SSH KEY
The key in the repository setting has only read permissions, and these users can only be accessed by owner merge code through pull request.
Key in user setting. Code can be submitted through ssh as long as the user has write permission in repository.
So the solution is
Delete the ssh key setting in the repository setting
Add ssh key to the user's setting