rexarski

New Mac setup checklist

Updated on 2022-09-14: Made some changes to the procedure. I’ll keep the repository updated on GitHub.

There are some things that we don’t need to recite fluently, but rather to keep them in a memo. Like the following a couple of things to do when I set up a new Mac.

As GitHub stopped supporting users from using account passwords for authenticated Git operations.

We need to do the following set up:

  1. Generate an SSH key on the new device as no SSH keys exist inside .ssh
    • ssh-keygen -t ed25519 -C “email@example.com”
    • Enter the path with filename /Users/myname/.ssh/id_ed25519_github after the prompt
    • Enter a passphrase (optional), then id_ed25519_github and id_ed25519_github.pub will appear
  2. Add the SSH key to ssh-agent
    • Start the ssh-agent by exec ssh-agent zsh
    • Add newly created SSH private key to the ssh-agent by ssh-add —apple-use-keychain ~/.ssh/id_ed25519_github
    • Create a config file touch ~/.ssh/config with:
Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519_github
  1. Add the SSH key to GitHub account
  1. Additionally, inside .git/config, use SSH url instead of HTTPS url.

I’ve also created a list of applications and something more that I consider as “essential ones” in a GitHub repository.

New device, new environment, new day.

#macos