How do I install bash on my Windows local runner?

How do I install bash on my Windows local runner?

Since my costs are getting to high, I’m trying to move to local runners. But my script immediately fails because there is no bash on windows. What version of bash should I install and where do I get it? I don’t see bash listed on the “Software installed on GitHub-hosted runners” document.

I tried install Linux subsystem for Windows to get bash, it gets me bash, but it fails right away:

Run echo -e '[url ""]\n insteadOf = ""' >> ~/.gitconfig
/bin/bash: No such file or directory
##[error]Process completed with exit code 1.

WSL bash will not work because it runs relative to the WSL filesystem, and the temporary script that is created exists on the host’s (Windows) filesystem

Actually, the bash on Windows for GitHub hosted machines is provided via Git Bash (packaged with Git for Windows), but more specifically this version of bash I believe comes from MSYS which you could install on your Windows machines to get bash (and other GNU utilities)

Alternatively you can use a shell other than bash, such as cmd or powershell, which will be installed by default on your Windows machines, see the docs on that here:

Hope that helps!

I needto add C:\Program Files\Git\bin to my path and then it worked.