Skip to content

First Time Setup

nguyenvukhang edited this page Jan 17, 2022 · 2 revisions

These are actions only have to be done once per device.

Git

Add name and email to your local git configuration so git knows who's writing your commit messages.

These particulars don't have to match your GitHub account details.

git config --global user.name "John Doe"
git config --global user.email "johndoe@example.com"
git config --global pull.rebase false

To check your settings, do a quick

git config --list

For more information, see git's documentation.

GitHub

To be able to clone private repositories from GitHub, you need to authenticate yourself using an SSH key.

Follow GitHub's guide on how to

  1. Check for existing SSH keys / Generate a new SSH key
  2. Add a new SSH key to your GitHub account

After you are done, your GitHub settings should look like this:

Github SSH and GPG keys page

Now, you can clone a private repo with

git clone git@github.com:sunnustech/app.git

Doing this for the first time, you should see:

$ git clone git@github.com:sunnustech/app.git
Cloning into 'app'...
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+<some chars>/<some more chars>.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Simply type in yes and hit enter.

From now on, every time you run git clone <repository url>, git will not bother you any more. Go ahead and try to clone another private repo:

git clone git@github.com:sunnustech/website.git

Clone this wiki locally