Bitbucket への 初めてのpushでエラーになる対処法

bitbucket push deployment key is read-only エラー 

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/master:refs/heads/master

Pushing to git@bitbucket.org:mtdsnsk/heatlthlog.git
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.
Completed with errors, see above

 

BitBucketではSSHキーをユーザーアカウント自体と各レポジトリ毎に設定できる。そして各レポジトリ毎に設定したものはDeployment Keyといって、Read onlyのため要注意。

下記の内容そのままだけど、毎回忘れるので個人的備忘録として残す

personal.loudandproud.me