local
Mercurial is a free, distributed source control management tool. This tutorial covers how to install Mercurial on Ubuntu and clone the Fab Academy archive.
You need ssh (secure shell) to communicate with the Fab Academy server in order to clone and communicate with the shared archive. It should be installed by default, but just in case...
start "Terminal" (starting programs in Ubuntu)
Type or copy the following line (copy paste in VirtualBox)sudo apt-get install sshThen to instal Mercurial - Type:
sudo apt-get install mercurial
You will have to enter your password, which is the same as your login password. You confirm with either Y or with the Enter-key.
Start "firefox" (starting programs in Ubuntu)
Go to your webmail (googlemail, yahoo, msn...)
Find the E-mail I sent you.
Download academy and academy.pub one by one to your Downloads folder (~/Downloads).
Type:
mkdir ~/.ssh
mv ~/Downloads/academy.txt ~/Downloads/academy
copy academy to .ssh
mv ~/Downloads/academy ~/.sshthen type:
mv ~/Downloads/academy.pub ~/.sshto copy academy.pub to .ssh
Both keys are now located in the .ssh directory. You can check to see by typing: sudo ls -l ~/.ssh/ to list the contents of the directory. You should see that academy and academy.pub are listed.
You need to set permissions for your private key so that only you have read/write access to them.
Type:
sudo chmod 600 ~/.ssh/academyThen type:
sudo chmod 644 ~/.ssh/academy.pubChange path below to wherever you would like to store the archive (or leave on Desktop):
mkdir ~/Desktop/Archive
Now we need to clone our local Archive in Barcelona.
Copy the text below and paste it into the terminal:
hg clone -e "ssh -p 846 -i ~/.ssh/academy" ssh://hg@fabacademy.org/academy.node.barcelona ~/Desktop/Archive/
If you are cloning for the first time, you will be told that the "authenticity of the host cannot be established" and are given the option to type "yes" or "no".
Type "yes"
You should see the following response (or a similar response)in the terminal as the archive is cloned. Success!
requesting all changes adding changesets adding manifests adding file changes added 10 changesets with 119 changes to 112 files updating to branch default 111 files updated, 0 files merged, 0 files removed, 0 files unresolved
Now you need to edit your archive's personal configuration file. To do this you need to move into the archive folder that you just created on the desktop.
Copy and paste the following line to "gedit" (starting programs in Ubuntu).
Change to your name and email address, then paste the entire line into the terminal:
echo -en "\n\n[ui]\nusername = First Last <email@mit.edu>\nssh = ssh -i ~/.ssh/academy -C\n\n[extensions]\nconvert =\nfetch =\n\n[hooks]\n\nchangegroup = hg update >&2" >> ~/Desktop/Archive/.hg/hgrc
So for example in my case it would look like this:
echo -en "\n\n[ui]\nusername = Ferdinand Meier <ferdi@fablabbcn.org>\nssh = ssh -i ~/.ssh/academy -C\n\n[extensions]\nconvert =\nfetch =\n\n[hooks]\n\nchangegroup = hg update >&2" >> ~/Desktop/Archive/.hg/hgrc
change to your Archive directory
cd ~/Desktop/Archive/
Now try updating your archive by typing:
hg pull
you should see a response like this:
pulling from ssh://hg@fabacademy.org/academy.2015/Web/na searching for changes no changes found
Congratulations! You have been successful and you can now work with the archive. Look over the Mercurial basics and resources page.
However, if you get a response like this:
pulling from ssh://hg@fabacademy.org/academy.2015/Web/naType "hg update", now you are successful.
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 2 changes to 2 files
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
(run 'hg update' to get a working copy)
In order to update your website you have to copy your files to the Archive and "push" them to the server.
Make sure that your site is inside a folder with your name. Take the name from the academy.org links (click on your name and copy the name of the folder: e.g. firstname_secondname.lastname). Check that there is a valid index.html (not Index.html or index.htm or index.HTML!!!) directly inside this folder.
Double check that you only upload allowed filetypes (only html, gif, jpeg, css and javascript!)
Make sure that your images are not much bigger than about 100kB in size!
If your Linux runs on virtualbox you might have to copy from the host to the guest-machine. Virtualbox filesharing
If you have a regular installation of Ubuntu, you can just copy the files from your windows/mac partition.
Use the file browser to copy your website to the Archive folder on your Desktop
Next thing to do is to open your Terminal and go to your Archive folder
cd ~/Desktop/Archive/Then execute
hg pull
hg update
hg addremove
hg commit -m "meangingful message"
hg push
Never, ever, EVER use push -f to force. You will regret it.
remote: ssh: connect to host fabacademy.org port 22: Connection refused abort: no suitable response from remote hg!
Then you forgot to edit the config file (see step 6)
Tutorial by Anna Kaziunas France adapted by Ferdinand Meier - Last Updated February , 9th 2015
Mercurial is a free, distributed source control management tool. This tutorial covers how to install Mercurial on Ubuntu and clone the Fab Academy archive.
You need ssh (secure shell) to communicate with the Fab Academy server in order to clone and communicate with the shared archive. It should be installed by default, but just in case...
start "Terminal" (starting programs in Ubuntu)
Type or copy the following line (copy paste in VirtualBox)sudo apt-get install sshThen to instal Mercurial - Type:
sudo apt-get install mercurial
You will have to enter your password, which is the same as your login password. You confirm with either Y or with the Enter-key.
Start "firefox" (starting programs in Ubuntu)
Go to your webmail (googlemail, yahoo, msn...)
Find the E-mail I sent you.
Download academy and academy.pub one by one to your Downloads folder (~/Downloads).
Type:
mkdir ~/.ssh
mv ~/Downloads/academy.txt ~/Downloads/academy
copy academy to .ssh
mv ~/Downloads/academy ~/.sshthen type:
mv ~/Downloads/academy.pub ~/.sshto copy academy.pub to .ssh
Both keys are now located in the .ssh directory. You can check to see by typing: sudo ls -l ~/.ssh/ to list the contents of the directory. You should see that academy and academy.pub are listed.
You need to set permissions for your private key so that only you have read/write access to them.
Type:
sudo chmod 600 ~/.ssh/academyThen type:
sudo chmod 644 ~/.ssh/academy.pubChange path below to wherever you would like to store the archive (or leave on Desktop):
mkdir ~/Desktop/Archive
Now we need to clone our local Archive in Barcelona.
Copy the text below and paste it into the terminal:
hg clone -e "ssh -p 846 -i ~/.ssh/academy" ssh://hg@fabacademy.org/academy.node.barcelona ~/Desktop/Archive/
If you are cloning for the first time, you will be told that the "authenticity of the host cannot be established" and are given the option to type "yes" or "no".
Type "yes"
You should see the following response (or a similar response)in the terminal as the archive is cloned. Success!
requesting all changes adding changesets adding manifests adding file changes added 10 changesets with 119 changes to 112 files updating to branch default 111 files updated, 0 files merged, 0 files removed, 0 files unresolved
Now you need to edit your archive's personal configuration file. To do this you need to move into the archive folder that you just created on the desktop.
Copy and paste the following line to "gedit" (starting programs in Ubuntu).
Change to your name and email address, then paste the entire line into the terminal:
echo -en "\n\n[ui]\nusername = First Last <email@mit.edu>\nssh = ssh -i ~/.ssh/academy -C\n\n[extensions]\nconvert =\nfetch =\n\n[hooks]\n\nchangegroup = hg update >&2" >> ~/Desktop/Archive/.hg/hgrc
So for example in my case it would look like this:
echo -en "\n\n[ui]\nusername = Ferdinand Meier <ferdi@fablabbcn.org>\nssh = ssh -i ~/.ssh/academy -C\n\n[extensions]\nconvert =\nfetch =\n\n[hooks]\n\nchangegroup = hg update >&2" >> ~/Desktop/Archive/.hg/hgrc
change to your Archive directory
cd ~/Desktop/Archive/
Now try updating your archive by typing:
hg pull
you should see a response like this:
pulling from ssh://hg@fabacademy.org/academy.2015/Web/na searching for changes no changes found
Congratulations! You have been successful and you can now work with the archive. Look over the Mercurial basics and resources page.
However, if you get a response like this:
pulling from ssh://hg@fabacademy.org/academy.2015/Web/naType "hg update", now you are successful.
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 2 changes to 2 files
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
(run 'hg update' to get a working copy)
In order to update your website you have to copy your files to the Archive and "push" them to the server.
Make sure that your site is inside a folder with your name. Take the name from the academy.org links (click on your name and copy the name of the folder: e.g. firstname_secondname.lastname). Check that there is a valid index.html (not Index.html or index.htm or index.HTML!!!) directly inside this folder.
Double check that you only upload allowed filetypes (only html, gif, jpeg, css and javascript!)
Make sure that your images are not much bigger than about 100kB in size!
If your Linux runs on virtualbox you might have to copy from the host to the guest-machine. Virtualbox filesharing
If you have a regular installation of Ubuntu, you can just copy the files from your windows/mac partition.
Use the file browser to copy your website to the Archive folder on your Desktop
Next thing to do is to open your Terminal and go to your Archive folder
cd ~/Desktop/Archive/Then execute
hg pull
hg update
hg addremove
hg commit -m "meangingful message"
hg push
Never, ever, EVER use push -f to force. You will regret it.
remote: ssh: connect to host fabacademy.org port 22: Connection refused abort: no suitable response from remote hg!
Then you forgot to edit the config file (see step 6)
Tutorial by Anna Kaziunas France adapted by Ferdinand Meier - Last Updated February , 9th 2015