mirror of https://github.com/01-edu/public.git
Use HTTPS instead of SSH for Git
This commit is contained in:
parent
22fd17bda5
commit
4d891661ac
|
@ -16,35 +16,23 @@ This repository will be the folder where all the exercices must be uploaded.
|
||||||
|
|
||||||
Once created, clone that repository on your desktop.
|
Once created, clone that repository on your desktop.
|
||||||
|
|
||||||
|
First, tell Git to remember your password (like a web browser would):
|
||||||
|
|
||||||
|
```
|
||||||
|
git config --global credential.helper store
|
||||||
|
```
|
||||||
|
|
||||||
If your username was `choumi` this is the command that will need to be used:
|
If your username was `choumi` this is the command that will need to be used:
|
||||||
|
|
||||||
`git clone git@git.((DOMAIN)):choumi/((ROOT)).git`
|
```
|
||||||
|
git clone https://git.((DOMAIN))/choumi/((ROOT)).git
|
||||||
|
```
|
||||||
|
|
||||||
This command needs to be adapted with **your own username**.
|
This command needs to be adapted with **your own username**.
|
||||||
|
|
||||||
If the `git clone` gives you an authenticity of host error, your SSH key must be configured.
|
|
||||||
Follow the steps below.
|
|
||||||
|
|
||||||
#### SSH Configuration
|
|
||||||
|
|
||||||
Execute the following commands:
|
|
||||||
|
|
||||||
```console
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ''
|
|
||||||
cat ~/.ssh/id_ed25519.pub
|
|
||||||
```
|
|
||||||
|
|
||||||
- Copy the result and paste it in the content field of adding an SSH key in your [Gitea settings](<https://git.((DOMAIN))/user/settings/keys>)
|
|
||||||
|
|
||||||
- Confirm by clicking on the add key button.
|
|
||||||
|
|
||||||
Once this is done the git clone command should work now.
|
|
||||||
|
|
||||||
#### gitignore file
|
#### gitignore file
|
||||||
|
|
||||||
Once you repository is cloned,
|
Once you repository is cloned, create and edit the .gitignore file in your repository and add this line:
|
||||||
create and edit the .gitignore file in your repository and add this line:
|
|
||||||
|
|
||||||
```console
|
```console
|
||||||
**/target/*
|
**/target/*
|
||||||
|
|
Loading…
Reference in New Issue