Install Git bash with external OpenSSH default for Windows

Git for Windows focuses on offering a lightweight, native set of tools that bring the full feature set of the Git SCM to Windows while providing appropriate user interfaces for experienced Git users and novices alike.
This post will show How to install Git bash for Windows with good settings.

Before install

  • Start Edit group policy
  • Open Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment
  • Scroll down find Create symbolic links and double click > Add User or Group
  • Advanced > Find Now > Select your computer user > OK > OK > OK
  • Restart your computer to Apply permission

Download and Install Git bash

Go to official Github repository releases and get correct version for your Windows (Normally 64-bit.exe)
https://github.com/git-for-windows/git/releases/latest

After download just open setup file, allow UAC Administrator permission, and read Terms and Conditions. When you are ready to continue with Setup, click Next.
From now you can choose options for how Git bash will install into your computer. Below is our recommend which will work perfect on Windows

  • Destination Location: Default, just click Next
  • Start Menu Folder: Default
  • The default editor used by Git: Default
  • The name of initial branch: Default
  • Adjusting your PATH environment: Default
  • The default behavior of git pull: Default
  • Credential helper: Default

Click Install to start! You can verify options by view file content in C:\Program Files\Git\etc
install-options.txt and gitconfig should look like that

Install Git bash options

Enable Windows OpenSSH Agent

On Windows you should Use external OpenSSH for Git bash option The SSH executable, so after install Git bash you also need enable Windows OpenSSH Agent.
It’s quite easy because OpenSSH is already installed with Windows. You can confirm by running the following command in Terminal:

where ssh
ssh -V

Final just enable OpenSSH Authentication Agent service
Start Services > Right click at OpenSSH Authentication Agent > Properties
Select Startup type to Automatic > Click Apply > Click Start > Click OK
Verify by run command ssh-add -L

Troubleshoot

If your computer not installed OpenSSH yet or uninstalled, can not find OpenSSH Authentication Agent service ,…anything make it not available then you can install again by
Start Settings > System > Optional features
(If OpenSSH Client already in Added features then need remove it first before re-install)
Click View features > Type OpenSSH > Select OpenSSH Client > Next

Leave a Reply

Your email address will not be published. Required fields are marked *