May 3, 2024


Set up your pub key

On a new computer where you want to set up your github account, first check if your public key exists already or not

$ ls -lart ~/.ssh

to see if existing SSH keys are present. If none is,

$ ssh-keygen -t ed25519 -C ""

Press enter when prompted for a passphrase if you want it to be blank.

If you are using a legacy system that doesn’t support the Ed25519 algorithm, use:

$ ssh-keygen -t rsa -b 4096 -C ""
$ cat ~/.ssh/

Upload it to github

  1. Then select and copy the contents of the file displayed in the terminal to your clipboard.
  2. Then login on and in the upper-right corner of any page, click your profile photo, then click “Settings”.
  3. In the “Access” section of the sidebar, click SSH and GPG keys
  4. Click New SSH key or Add SSH key.
  5. In the “Title” field, add a descriptive label for the new key. For example, if you’re using a personal laptop, you might call this key “Personal laptop”.

Set up things globally

On the laptop your username and email, run

$ git config --global myusername
$ git config --global myemail