Setup SSH Keys in WSL with Bitbucket.
I’m creating a new SSH key within a linked folder, which means my SSH keys are backed up on the local machine in-case anything happens on this WSL instance… even though in this case I can easily recreate & re-add to my account if need be.
Create the key with a password and we’ll add it to agent in the next step so that we don’t need to enter it everytime.
ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org"
As mentioned above by adding our new SSH key to the ssh-agent so we don’t have to enter the passphrase everytime we use it.
eval $(ssh-agent -s) ssh-add pw_bitbucket
Now that the SSH key is ready, we just need to add that to the Git account you’re using. I’m using Bitbucket here.
Get the contents of the public SSH key with the Linux cat command. Copy everything except the email at the end.
Below is an example of when you haven’t added the SSH key to your account yet.
ssh -T email@example.com
Now add the key to your account.
Connect to Bitbiucket.
Get the git clone repo link.
Clone the repo.
Open Visual Studio Code or whichever editor you prefer.
And there we go.