12. februar 2012 08:05
Here is a fast guide to getting Mercurial and bitbucket working from the terminal in OSX Lion, enjoy :)
1. Download and install Mercurial
Download binaries from http://mercurial.selenic.com/ and install.
2. Creating Mercurial configuration
Create a .hgrc filer in your home folder: ~/.hcrg and add the following lines. Change the name and email to your name and email used ont butbucket.
username = Jon Doe <firstname.lastname@example.org>
ssh = ssh -C
3. Configure SSH
3.1: Set up your default identity by issuing the following command and entering a proper password
3.2: Copy the public key to your clipboard using the following command
cat ~/.ssh/id_rsa.pub | pbcopy
3.3 Add public key to bitbucket by browsing to Account -> SSH Keys and past the public key in the textbox left to the 'Add key' button. Then click the 'Add key' button.
4. All done!
Rember to use the SSH URL when cloning the repository and not the HTTPS url.