Labs Setup
This page contains instructions on how to set up your computer such that you can:
- program your assignments,
- make sure you keep track of your work with a version control system,
- submit your labs for grading, and
- use our black-box testing system.
Step 1) Creating a Public/Private SSH Key Pair
Authentication to the git repository works by using a SSH key. If you do not already have a private/public key combination for your computer, follow these instructions. Note that you typically generate one key pair per computer that you use.
From the Command Line
- Type
ssh-keygen -t rsa -b 2048
. - Type enter to save it in the default location.
- Choose a passphrase, or type enter to ignore it.
- Your public key is now stored in a file (typically, in ~/.ssh/id_rsa.pub). You will need to copy-paste the content of this file into our webservice.
Step 2) Project Web Interface
The web interface for your project will be directly linked to your git repository. It will allow you to run tests, submit deliverables, receive feedback, etc..
The web interface is located at https://larasrv13.epfl.ch/clp17 (Tequila authentication required.)
All labs will be done individually with the possible exception of the last one. Despite what the interface suggests, you need to create groups of 1 person each.
- Go to https://larasrv13.epfl.ch/clp17 and authenticate yourself
- The first time you go there, you can either create a group or wait until somebody created a group with you.
- Once you are within a group, go to the YourName > SSH Keys tab, and register the Public SSH key you just generated. Make sure you copy your entire key, including the `ssh-rsa` prefix and the key identifier at the end.
Step 3) Installing Git and sbt
Make sure your system is running Java 8 before starting.
Git is a well known version control system. In linux, you can download it through the package manager.
sbt is the default build tool for Scala. You can download it here.
When you have installed both tools, go to the directory where you want to place your repository and type
$ git clone git@larasrv13.epfl.ch:clp17-group??
(Exact URI is provided in the web interface under Repository)
$ cd amyc $ sbt $ [Info] (Downloading the whole internet...) $ ... > compile > ... > [success] Total time: ... > run library/Std.scala examples/Hello.scala
At this point, your compiler will fail until you implement the first assignment :)
Step 4) Download an IDE
If you choose to use an IDE, you can download either Eclipse or IntelliJ.
sbt provides a plugin to generate project files for Eclipse; you can find it here. In IntelliJ, you have to go through Import project
and point to the top-level directory of your project. You will have to link libraries under /lib manually under
File → Project Structure → Modules → Dependencies → Add
(on the right-hand side) → Jars and Directories
.
Troubleshooting
The Git repository is asking you for a password
No password will ever work. This simply means that the ssh key-pair is not properly installed.
Make sure the public key can be accessed under ~/.ssh/id_rsa.pub
and that you copied the entire key to the web interface:
ssh-rsa AASDFFOOBAR… foo@bar.com