less than 1 minute read

Things to do on a new machine (e.g., new GCE VM).

GitHub

  1. install git
  2. generate an SSH key for GitHub.
    • Bash
        ssh-keygen -t ed25519 -C "YOUR_EMAIL_HERE"
        eval "$(ssh-agent -s)"
        ssh-add ~/.ssh/id_ed25519
      
    • Powershell
        ssh-keygen -t ed25519 -C "YOUR_EMAIL_HERE"
        start-ssh-agent
      
  3. add the public key to GitHub: cat ~/.ssh/id_ed25519.pub here
  4. git config stuff:
     git config --global user.name "YOUR_NAME_HERE"
     git config --global user.email "YOUR_EMAIL_HERE"
     git config --global core.filemode true
    
  5. (optional for Unix) add keychain: sudo apt install keychain, then add the following to .bashrc:
     # Use `keychain` to load my SSH key
     /usr/bin/keychain -q --nogui $HOME/.ssh/id_ed25519
     source $HOME/.keychain/$HOSTNAME-sh
    

OS-specific

WSL

Add the following to .bashrc:

# allow opening webpages with Chrome
export BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"

This will allow opening URLs with sensible-browser, and was enough to make Chrome pop up e.g., when Google’s Python API wants to authenticate the user via a webpage prompt. To make xdg-open work additional fiddling is needed.