Submit

How to stop password prompts on any git command on macOS?

· Mandeep Singh · Solving Mistories

Ever since macOS 10.12 Sierra update for ssh, people have been facing issue with git prompting for ssh passphrase every time you run any git command.

Although, It’s been a long time since the release still I see many developers asking me this, so I thought to write a simple solution here.

What you need to do?

For macOS 10.12 Sierra ssh-add -K needs to be run after every reboot. To avoid this create ~/.ssh/config with this content.

Host *
    UseKeychain yes

That is all you need to do and you are good to go.

Want to Contribute?

Send me an Email, ping me on Twitter or submit a pull request on Github.

Sign up below to receive updates, tips and more handy tutorials when git screws up. It’s good stuff & I don’t spam.