Browse Source

update

pull/663/head
xpetit 4 years ago
parent
commit
18a9177125
No known key found for this signature in database
GPG Key ID: 4E1F8CF5DFA989D2
  1. 74
      docs/setup/README.md
  2. 2
      docs/setup/configure.sh

74
docs/setup/README.md

@ -58,6 +58,18 @@ Skip this part if Windows 10 is up-to-date.
- Click on "Restart now" - Click on "Restart now"
- Repeat [Install Updates](#install-updates) until you see "You're up to date" - Repeat [Install Updates](#install-updates) until you see "You're up to date"
## Install a web browser
Skip this part if you have a modern & full-featured web browser (e.g. Chrome, Firefox, etc).
We recommend to use Firefox with the extension "uBlock Origin" and the additional filters lists :
- Annoyances
- EasyList Cookie
- uBlock filters - Annoyances
Make sure to apply changes.
## Install Linux ## Install Linux
Skip this part if you already have WSL with Debian (or similar system e.g. Ubuntu). Skip this part if you already have WSL with Debian (or similar system e.g. Ubuntu).
@ -72,29 +84,77 @@ To "Open PowerShell as Administrator", right-click on the Start menu.
- Visit https://www.microsoft.com/en-us/p/debian/9msvkqc78pk6 - Visit https://www.microsoft.com/en-us/p/debian/9msvkqc78pk6
- Click on "Get" button - Click on "Get" button
- Launch - Launch
- Create user as requested (the password doesn't need to be secure) - Create user as requested (the password doesn't need to be secure and you have to remember it)
- Leave (by using the shortcut <kbd>Ctrl</kbd>+<kbd>D</kbd>, closing the window or typing the `exit` command) - Leave (by using the shortcut <kbd>Ctrl</kbd>+<kbd>D</kbd>, closing the window or typing the `exit` command)
## Install VSCode ## Install VSCode
Download it from the [official website](https://code.visualstudio.com).
Run the installer, check all "Additional Tasks".
### Install remote extension ### Install remote extension
Launch VSCode, once started it should detect WSL and propose you to install the "Remote - WSL" extension, which is needed for the next steps.
## Configure Linux ## Configure Linux
Connect to remote WSL ### Connect to remote WSL
Click on the bottom-left green button (overlay says "Open a remote window"), select "Remote-WSL: New Window".
It will open a new VSCode window then install and run a server program in Linux to help VSCode running in its context.
The bottom-left green button (Remote Host) in the VSCode status bar should now indicate "WSL: Debian".
You can close the previous VSCode window.
### Configure tools
In the Menu Bar of VSCode, click on "Terminal", then "New Terminal".
A new panel should appear looking like :
```
user@DESKTOP-XXXXXXX:~$ █
```
You can use right-click to copy/paste. This is a command-line interface, you can type commands and execute them pressing <kbd>Enter</kbd>. You can also complete your command using <kbd>Tab ↹</kbd>. For instance type "`ec`" :
```
user@DESKTOP-XXXXXXX:~$ ec█
```
Open a terminal then type the following commands : Then press <kbd>Tab ↹</kbd>. The command will be completed to "`echo`" and a space is added, waiting for arguments to be provided, type "`Hello World`" then <kbd>Enter</kbd> :
```
user@DESKTOP-XXXXXXX:~$ echo Hello World
Hello World
user@DESKTOP-XXXXXXX:~$ █
```
`echo` is a program that displays text. Now you will execute commands that will install all the necessary programs you will need :
``` ```
sudo apt update sudo apt update
```
Type the password you entered during [Linux installation](#install-debian).
When it's over (the command prompt appears again), continue entering commands (we hide their output):
```
sudo apt -y upgrade sudo apt -y upgrade
sudo apt -y install curl sudo apt -y install curl
curl ADDR | bash curl https://raw.githubusercontent.com/01-edu/public/master/docs/setup/configure.sh | bash
``` ```
- Then go to Gitea (https://git.DOMAIN/user/settings/keys) in Settings => SSH / GPG Keys Copy the last line (`ssh-ed25519...`) then :
- In "Manage SSH Keys" section, click on "Add Key" button
- Connect to Gitea (https://git.DOMAIN where DOMAIN is the 01 platform address)
- Click on top-right menu "Profile and Settings..."
- Click on "Settings"
- Go to "SSH / GPG Keys" tab
- Click on "Add Key" button in "Manage SSH Keys" section
- Paste the public key in the "Content" text area (the "Key Name" will be automatically set) - Paste the public key in the "Content" text area (the "Key Name" will be automatically set)
- Click on "Add Key" - Click on "Add Key"
Now you are able to push & pull code to Gitea using `git`.

2
docs/setup/configure.sh

@ -24,5 +24,5 @@ go get golang.org/x/tools/cmd/goimports
echo Installing OpenSSH echo Installing OpenSSH
sudo apt -y install openssh-client sudo apt -y install openssh-client
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N '' ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ''
echo "Select & copy (right-click) the following line :" echo "Copy the following line :"
cat ~/.ssh/id_ed25519.pub cat ~/.ssh/id_ed25519.pub

Loading…
Cancel
Save