Setup SSH for Git

From Bitbucket, choose Bitbucket settings from your avatar in the lower left.
  1. The Account settings page opens.
  2. Click SSH keys.
  3. If you've already added keys, you'll see them on this page.
  4. Open your ~/.ssh/id_rsa.pub file and copy its contents.
  5. From Bitbucket, click Add key.
  6. Enter a Label for your new key, for example, Default public key.
  7. Paste the copied public key into the SSH Key field
For more details refer here 
and here
When using git push if SSH gives you message that it's read only you can set https remote url as below


git remote set-url origin https://username@bitbucket.org/username/reponame.git

You should get prompt to enter the credentials.

Comments

Popular Posts