2

Hey guys I did a new machine setup on my laptop, installed VirtualBox and Vagrant running Laravel Framework projects.

Issue I have is the following:

Git Bash doesn't recognize vagrant at all, if I do vagrant anything nothing happens.

However if I run CMD Prompt I am able to use Vagrant globally and do vagrant up which works fine.

I am wondering why am I unable to do it with GitBash?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
IamCavic
  • 368
  • 1
  • 15

1 Answers1

2

Try switching to "Git system" (ie the one you can install on your Windows) instead of relying on "Git embedded".

Make sure you are launching SourceTree from a Windows session (or Windows CMD) where your PATH does include your Git installation, as extracted from the latest Git releases, like PortableGit-2.13.3-64-bit.7z.exe.

See an example of such PATH here.

set GH=C:\Git2.13.3
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%

Launch SourceTree from there.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks I will give this a try, I am just about to head out of the house... If it works I will make sure to accept the answer thank you for your time! – IamCavic Jul 16 '17 at 05:21
  • Same issue still.. My Git-CMD can run Vagrant Up with no issue but GitBash can't – IamCavic Jul 19 '17 at 01:19
  • @IamCavic "I do vagrant anything nothing happens." no output at all? no error message? nothing in any vagrant log? – VonC Jul 19 '17 at 07:07
  • @IamCavic Maybe something is wrong in the .vagrant.d folder? (as in https://stackoverflow.com/a/22587936/6309) – VonC Jul 19 '17 at 07:11
  • No I tried it all including a uninstall - install, when I run in GitBash Vagrant (anything) it just goes to the new line it gives no warning or errors just nothing happens – IamCavic Jul 19 '17 at 18:44
  • @IamCavic like stdout/stderr were redirected somewhere. What does `which vagrant` return? – VonC Jul 19 '17 at 18:46
  • PortableGit works but Git doesn't... wired thanks for help I will just use the one you have recommended in the first place – IamCavic Jul 19 '17 at 18:49
  • this is what is returned on the other one but it doesn't work $ which vagrant /c/HashiCorp/Vagrant/bin/vagrant – IamCavic Jul 19 '17 at 18:50
  • 1
    @IamCavic Yes, I never use the Git setup, always the portable one: I have a better control over the PATH that way. – VonC Jul 19 '17 at 19:28