Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 4

How do I install bash on my Windows local runner?

Solved! Go to Solution.

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.

3 Replies
Highlighted
Copilot Lvl 3
Message 2 of 4

Re: How do I install bash on my Windows local runner?

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 = "git@github.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.
 
Highlighted
Solution
GitHub Staff
Message 3 of 4

Re: How do I install bash on my Windows local runner?

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:

 

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-...

 

Hope that helps!

Highlighted
Copilot Lvl 3
Message 4 of 4

Re: How do I install bash on my Windows local runner?

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