GitHub

Branches > Branch Protection Rules

  • Require branches to be up to date before merging (can be a lot of reruns when lots of PRs open, and run up CI minutes)

Permissions

git@github.com: Permission denied (publickey)

This happens when the SSH key is rejected. To confirm this, run:

$ ssh -T git@github.com
git@github.com: Permission denied (publickey).
  • Generating an SSH key
    • $ ssh-keygen -t ed25519 -C youremail@yourdomain.com
      • Default file
      • No passphrase
  • Adding SSH key to GitHub account
    • $ pbcopy < ~/.ssh/id_ed25519.pub
    • Go to Settings > SSH and GPG keys
    • Look for the key in the list of SSH keys
    • Click “New SSH key” and paste it in

remote: Invalid username or password. fatal: Authentication failed for ‘https://github.com/CodingItWrong/surely-api.git/’

  • Rerun command and you should be prompted for a password
  • Create a new personal access token in Settings > Developer settings > Personal access tokens

Hub CLI: Error creating repository: Unauthorized (HTTP 401) - Bad credentials

$ rm ~/.config/hub

Rerun hub command and log in with a personal access token as the password