Bitbucket: create SSH key, upload SSH key
GitHub is very good for open source projects, I also use it. However, if you want to work on a private project alone or with some of your friends and you don’t want to share the code, then Bitbucket could be a better choice since it allows you to create unlimited number of private repositories.
You are at a new machine of yours. You create a new repository, clone it on your localhost, make some changes, and when you try to push the changes to the repo, you get an error message that you should upload your SSH key. How to do that?
Check if you have an SSH key:
$ cat ~/.ssh/id_rsa.pub
If you don’t have an SSH key, create one:
ssh-keygen -t rsa -b 4096 -C "email@example.com"
Accept the default file location and provide a passphrase.
Then copy the content of “~/.ssh/id_rsa.pub” to the clipboard and add it to your account by following these steps.