Question

Windows 8 Composer Install from private repository Message: "Failed to clone ... git was not found, git was not found, check that it is installed and in your path ENV".

I have tried using composer install from both the Windows terminal and Git Bash with the same message. Git is definitely installed with the correct path environments, and the same with Composer.

My private repositories have worked elsewhere on Windows 7 and on a Linux server so I believe this could be a Windows 8 problem.

Has anyone else had this same problem? If so, how would you go about fixing it?

It is just a general Windows problem and I can use git and even find the Git version, but when trying to composer install or update, it can't find git.

I would appreciate any answers.

Was it helpful?

Solution

For anyone wanting to know how I fixed this issue. I had tried installing a plugin for command prompt which adds colour to the command for better feedback (I think this was something for a Ruby program).

The plugin went Rogue and wasn't installing properly, this some how interfered with Composer trying to find git and caused me a big headache.

I found the problem when searching for something in the registry and it required me to go into HKEY_CURRENT_USER and found it somewhere in there. I remembered it being something I installed and completely forgot about so it just clicked.

I deleted this from the registry and voila composer started running as it should have from the start. I ran the composer install with some packages which are private to me and they downloaded without a problem.

OTHER TIPS

There are multiple ways to get to the "Advanced Properties" so I am picking one:

From Control Panel choose System

From System choose Advanced System Settings

From Advanced System Settings choose Environment Variables...

In the System Variables list scroll down to Path

In the dialog box that pops up located the BIN and CMD variables for GIT and delete them

In that same dialog box scroll to the end of that path and add the following ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd making sure no spaces are present expect in the folder name Program Files

  • this assumes C:\program files is the install group folder

Also see here for additional help: 'git' is not recognized as an internal or external command

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top