Git configuration

Students at EPITA have to use SSH Key-Based Authentication to access their Git repositories.

Generating an SSH Key Pair

OpenSSH provides a tool called ssh-keygen to generate and modify key pairs. You can learn more about its options by running man 1 ssh-keygen.

A key pair is composed of a private key (without extension by default) and a public key (.pub by default).

To generate a key pair, you can use:

ssh-keygen -a 100 -t ed25519

Warning

It is not recommended to generate a private key without a passphrase.

Publishing your public key

Now that you own a key pair, you need to publish your public key on the CRI Website. Your keys can be managed using SSH Keys on your profile.

Your public key can be retrieved using:

cat "$HOME/.ssh/id_ed25519.pub"

Configuring Git

While git-config can be used for much more than just configuring your identity, this will be the only part covered in this documentation.

Your identity, composed of a name and an email will be used to author your commits. You can set them by using the following commands:

git config --global user.name 'Firstname LASTNAME'
git config --global user.email 'firstname.lastname@epita.fr'