Last active
August 29, 2015 13:58
-
-
Save sgnl/9983808 to your computer and use it in GitHub Desktop.
Setting up SSH and .git/config to work with BitBucket
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
//On BitBucket | |
var user = 'sgnl' //enter your username here | |
if (!logged_in_at_bitbucket){ | |
userLogin(); | |
} | |
goTo.YourAccountSettings('https://bitbucket.org/account/' + user + '/'); | |
$('a#SSH-Kets').click(); | |
$('button#Add-key').click(); | |
/* | |
* in your terminal get your SSH key | |
* pbcopy < ~/.ssh/is_rsa.pub // OSX | |
* //Ubuntu?????? | |
* clip < ~/.ssh/id_rsa.pub //Windows | |
*/ | |
$('.textrea .longfield').val(your-ssh-key); | |
$('button#add-key').click(); | |
/* | |
Replace 'user' with your user name and update your path to your project accordingly. | |
Add bitbucket remote to your git with: | |
git remote add origin git@bitbucket.com:user/path/to/project.git | |
if you already set up your origin as https connection then you will | |
have to make a new reference or overwrite it with the above url. | |
Another way is to edit your .git/config file and add string from above | |
"git@bitbucket.com:user/path/to/project.git" | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment