Mercurial: Difference between revisions

From Fab Lab Wiki - by NMÍ Kvikan
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:


==Mercurial on Ubuntu==
==Mercurial on Ubuntu==
===Install===
===Step 1: Install===
Install .ssh
  sudo apt-get install ssh
 
Download the academy and academy.pub files to your .ssh folder.
 
Linux packages
Linux packages
*apt-get install mercurial tortoisehg tortoisehg-nautilus   
sudo apt-get install mercurial tortoisehg tortoisehg-nautilus   
 
install Mercurial
sudo apt-get install mercurial


===Step 2: Key files===
put key files (academy and academy.pub) somewhere, probably in ~/.ssh/keys/ (you might want to create this keys directory)
note that directories that start with a "." may be automatically hidden by your filesystem, you can see them by typing ls -a
example:
use the terminal and create a folder called .ssh in the home directory, then within the new .ssh directory create another directory called keys
download the (academy and academy.pub) files and place them in the keys directory (you will have to either enable hidden folders, or do this all through the terminal)
sudo mv academy ~/.ssh
sudo mv academy.pub ~/.ssh


Install .ssh
===Step 3: Permissions for the private key ===
* sudo apt-get install ssh
set permissions for your private key so that only the user has read/write access (i.e. sudo chmod go-rw ~/.ssh/keys/academy)
your private key permissions could be rw-------, and your public key and config file permissions could be rw-r--r--  


Download the academy and academy.pub files to your .ssh folder.
~/.ssh$ sudo chmod go-rw academy
~/.ssh$ sudo chmod go-rw-r--r-- academy.pub


===Step 4: Setting the port===
step 4:
set the port that ssh uses to access fab.cba.mit.edu, by appending the following lines to ~/.ssh/config (you might have to create ~/.ssh/config, which is a text file with unix line endings and no .txt extension)


install Mercurial
*host fab.cba.mit.edu
*sudo apt-get install mercurial
*port 846


~/.ssh$ gedit config


===Step 5 Clone the archive===
Copy this text to the terminal:
Copy this text to the terminal:
*~/Documents/FabAcademy$ hg clone -e "ssh -p 846 -i ~/.ssh/keys/academy" ssh://hg@fab.cba.mit.edu/academy academy
*~/Documents/FabAcademy$ hg clone -e "ssh -p 846 -i ~/.ssh/academy" ssh://hg@fab.cba.mit.edu/academy academy
 
 
===And also===
 





Revision as of 18:17, 5 January 2011

Mercurial is a free, distributed source control management tool. It efficiently handles projects of any size and offers an easy and intuitive interface.

Mercurial on Ubuntu

Step 1: Install

Install .ssh

 sudo apt-get install ssh

Download the academy and academy.pub files to your .ssh folder.

Linux packages

sudo apt-get install mercurial tortoisehg tortoisehg-nautilus  

install Mercurial

sudo apt-get install mercurial

Step 2: Key files

put key files (academy and academy.pub) somewhere, probably in ~/.ssh/keys/ (you might want to create this keys directory) note that directories that start with a "." may be automatically hidden by your filesystem, you can see them by typing ls -a example: use the terminal and create a folder called .ssh in the home directory, then within the new .ssh directory create another directory called keys download the (academy and academy.pub) files and place them in the keys directory (you will have to either enable hidden folders, or do this all through the terminal)

sudo mv academy ~/.ssh
sudo mv academy.pub ~/.ssh

Step 3: Permissions for the private key

set permissions for your private key so that only the user has read/write access (i.e. sudo chmod go-rw ~/.ssh/keys/academy) your private key permissions could be rw-------, and your public key and config file permissions could be rw-r--r--

~/.ssh$ sudo chmod go-rw academy
~/.ssh$ sudo chmod go-rw-r--r-- academy.pub

Step 4: Setting the port

step 4: set the port that ssh uses to access fab.cba.mit.edu, by appending the following lines to ~/.ssh/config (you might have to create ~/.ssh/config, which is a text file with unix line endings and no .txt extension)

  • host fab.cba.mit.edu
  • port 846
~/.ssh$ gedit config

Step 5 Clone the archive

Copy this text to the terminal:


And also

To open Mercurial

  • ~/Documents/FabAcademy/academy$ hg pull


Work in process.... to be editied