Last active
April 22, 2020 10:26
-
-
Save Zackio/9befe519cbe45b51d4a7910006f8850f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> I had problems with ssh access. So in sourcetree use ouath and http to connect | |
## Setup SSH | |
Check if you have keys already, you want id_rsa.pub: | |
ls -a ~/.ssh | |
If it's there, copy it's contents and go to bitbucket > Manage accounts > ssh | |
If not create a pair then go put it there. | |
ssh-keygen -t rsa | |
You'll be promted for a name - use a unique reference. | |
A new pair also needs adding to your ssh client. Secound adds to keychain so we have it for soucetree | |
ssh-add ~/.ssh/id_rsa | |
ssh-add -K ~/.ssh/id_rsa | |
This only adds temporarity until reboot for permanance | |
https://macnative.com/permanently-add-my-ssh-key-to-the-keychain-in-osx-mojave/ | |
Add to .ssh/config | |
Host * | |
UseKeychain yes | |
AddKeysToAgent yes | |
IdentityFile ~/.ssh/id_rsa | |
## ! If asks for password still | |
Go to your git folder and look at this file. | |
vim .git/config | |
if under remote origin url is a htts then you need to get the ssh address. | |
go to the bitbucket project and grab the clone url for ssh | |
Then put that as the url instead | |
Copy the rsa file with this (mac) | |
pbcopy < ~/.ssh/id_rsa.pub | |
That should be it. For more information, go here: | |
https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment