If you are having problems with OSX Sierra and authenticating with github, the issue is that OSX Sierra doesn’t automatically add ssh keys by default.

References:

One solution is to add the below lines to your .ssh/config file:

Host *
  IdentityFile ~/.ssh/id_rsa
  AddKeysToAgent yes