Shami's Blog

Sysadmin, Because Even Developers Need Heroes

Go Get Error With Babun Shell

2017-11-21 by Mohammad H. Al-Shami

Quick one here, if you run into the following error when trying to download a go package using Babun

go get -u -v (download)
# cd .; git clone C:\Users\Mohammad Al-Shami\go\src\\cosiner\argv
Cloning into 'C:\Users\Mohammad Al-Shami\go\src\\cosiner\argv'...
fatal: Invalid path '/cygdrive/c/Users/Mohammad Al-Shami/Desktop/go/C:\Users\Mohammad Al-Shami\go\src\\cosiner\argv': No such file or directory
package exit status 128

This is because Babun comes with it’s own version of git which is Unix based and doesn’t understand Windows file paths. A simple solution is to use the Windows version of git and give it a higher priority.

# ~/.zshrc

export PATH=/c/bin/git/bin:$PATH

Just restart your shell or source ~/.zshrc and you’re ready to go.

Happy development.

About Me

Dev gone Ops gone DevOps. Any views expressed on this blog are mine alone and do not necessarily reflect the views of my employer.