GIT Course

Server-side setup

Go back

A repository is a project (literally, this is a directory) where you will store your code. You usually put a file in it, written in Markdown to describe your project.

We will strongly refer to GitHub but these things are the same everywhere. Here is their official tutorial to create a repository.

Then, before we continue, you have 2 choices

  • each time you make a commit, you need to log in
  • each time you make a commit, you don't need to log in: set up ssh keys

SSH keys

So if you don't want to log in at each commit, set what we call ssh keys. Here is the official GitHub tutorial generating-a-new-ssh-key, or you can do that

  • ssh-keygen -t rsa -b 4096 -C "email"
  • cat ~/.ssh/
  • copy the text
  • on GitHub/Gogs/..., go to settings then SSH keys
  • add the key