mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.8 KiB
68 lines
1.8 KiB
6 years ago
|
## Introduction
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
#### 1- get-ready
|
||
|
|
||
5 years ago
|
Create in your [Gitea](https://git.[[DOMAIN]]) account the repository named `[[ROOT]]`.
|
||
6 years ago
|
|
||
5 years ago
|
This repository will be the folder where all the exercices must be uploaded.
|
||
|
|
||
6 years ago
|
Once created, clone that repository on your desktop.
|
||
|
|
||
5 years ago
|
If your username was `choumi` this is the command that will need to be used :
|
||
|
|
||
5 years ago
|
`git clone git@git.[[DOMAIN]]:choumi/[[ROOT]].git`
|
||
6 years ago
|
|
||
5 years ago
|
This command needs to be adapted with **your own username**.
|
||
6 years ago
|
|
||
5 years ago
|
If the `git clone` gives you an authenticity of host error, your SSH key must be configured.
|
||
|
Follow the steps below.
|
||
5 years ago
|
|
||
5 years ago
|
#### SSH Configuration
|
||
5 years ago
|
|
||
|
Execute the following commands:
|
||
|
|
||
|
```console
|
||
|
mkdir -p ~/.ssh
|
||
|
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ''
|
||
|
cat ~/.ssh/id_ed25519.pub
|
||
|
```
|
||
|
|
||
5 years ago
|
- Copy the result and paste it in the content field of adding an ssh key in your settings (adapt the link with your username).
|
||
5 years ago
|
|
||
5 years ago
|
[https://git.[[DOMAIN]]/choumi/settings/keys](https://git.[[DOMAIN]]/choumi/settings/keys)
|
||
5 years ago
|
|
||
5 years ago
|
- Confirm by clicking on the add key button.
|
||
5 years ago
|
|
||
5 years ago
|
Once this is done the git clone command should work now.
|
||
6 years ago
|
|
||
|
#### 2- set
|
||
|
|
||
6 years ago
|
Once the repository is created, write your first shell program called `hello.sh`
|
||
6 years ago
|
|
||
5 years ago
|
When executed this program must print `Hello choumi!`
|
||
|
Where `choumi` is your username
|
||
6 years ago
|
|
||
|
##### Usage
|
||
|
|
||
5 years ago
|
If the username is `choumi` :
|
||
6 years ago
|
|
||
|
```console
|
||
5 years ago
|
user@host:~/[[ROOT]]$ ./hello.sh
|
||
5 years ago
|
Hello choumi!
|
||
5 years ago
|
user@host:~/[[ROOT]]$
|
||
6 years ago
|
```
|
||
|
|
||
|
#### 3- go-say-hello
|
||
|
|
||
6 years ago
|
After that the `hello.sh` is executing correctly, it needs to be uploaded to the repository with the following commands :
|
||
6 years ago
|
|
||
|
1. `git add hello.sh`
|
||
|
2. `git commit -m "My very first commit"`
|
||
5 years ago
|
3. `git push`
|
||
6 years ago
|
|
||
5 years ago
|
Once these steps are applied, the file can now be submitted for grading on the platform by clicking on the "RUN INTRODUCTION TEST..." button.
|
||
6 years ago
|
|
||
|
This action will run the tests on your submitted `hello.sh` file.
|