Git PublicKey denied on Mac OS X Sierra

If your Git publickey is denied to connect to your remote host (by pulling, pushing, etc.), first, check if you have actually an error to connect to your host:

If your SSH key is the issue, you should get this message:

Since Mac OS Sierra, the keychains are not autoloaded and must be explicitly called. So we will check if your keys are stored in the ssh-agent:

Verify in the list if you have your SSH key needed for your repository. If you don’t have any key, you will get this message:

To fix this issue, you will just have to add your SSH key in the ssh-agent with this command line:

A Reddit post on the subject with a permanent solution : difficulties with ssh-agent in macOS Sierra

Customize and improve Terminal (Mac OS)

Today, I just wanted to share with you a simple way to customize your Terminal and improve its readability.

Color theme

First of all, I will recommand you to install a new theme for your Terminal. Of course, you can also customize it yourself, but there is already great themes available like this ones :

After choosing your theme, don’t forget to click on “Default” to enable this theme on every new Terminal window.


The default font in Terminal is Andale Mono, which is a good font, but you could customize it. My favorite for this is Anonymous Pro, but of course you can choose your own, just be aware to choose a Monospace font.

Download Anonymous Pro

Increase size

Depending on the font you choose, you can increase its size, the way you like it. Personally, I choosed 14px for Anonymous Pro.

Bold fonts or antialias text

I would recommand you to check at least one of this two checkbox :

  • Use bold fonts
  • Antialias text

This will hightly improve the readability of your font, especially if your using a retina screen.

Improve the syntax coloration and ls command

We will change the syntax coloration of the Terminal and get something like this.

Customized Terminal screen
Customized Terminal screen

To do that, we will need to edit our .bash_profile file. To open this file, type this in your Terminal :

Or edit it directly with nano or vim.

Then, past this lines at the beginning of the file and save it.

That’s it, your ready to go! Open a new Terminal and start doing awesome stuff!

Source: OSXdaily