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.
Solved! Solved! Go to Solution.
I tried install Linux subsystem for Windows to get bash, it gets me bash, but it fails right away:
Run echo -e '[url "https://github.com/"]\n insteadOf = "email@example.com:"' >> ~/.gitconfig /bin/bash: C:Usersrolanactions-runner_work_temp6e784503-7ac1-4008-b25a-c3a71740c897.sh: 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!