CSC495-2014 / TeamworkEnglewoodGit

GNU General Public License v2.0
5 stars 15 forks source link

git wrapper not finding git excecutable #141

Closed samuelfrench closed 10 years ago

samuelfrench commented 10 years ago

Ok, so I am getting an exception that git wrapper cannot find the git executable. Here is a screenshot of where the error is occurring in the gitwrapper.php file along with the exception message and http request. capture

So, git is in my path, and the symphony executable function's (http://api.symfony.com/2.4/Symfony/Component/Process/ExecutableFinder.html) find command I would think should be able to find it if it's in the path.

And here is the function that is calling the gitcommands model, which then accesses the gitwrapper

 public function gitAdd($user, $project)
    {
        $gitCommands = new GitCommands($user, $project);

        $path = Input::get("item");

        try
        {
            $gitCommands->gitAdd($path);
        }
        catch (Exception $e)
        {
            $exceptionMessage = $e->getMessage();
            return Response::json($exceptionMessage, 500);
        }

        return Response::make(null, 200);
    } 
samuelfrench commented 10 years ago

@apotheos @ZAM- @jkwendt @cdwainscott @cstclair

jkwendt commented 10 years ago

I'll give you an update in a few hours.

mikeholler commented 10 years ago

@samuelfrench, open the windows command line (cmd) and type git and hit enter. Paste the output here.

jkwendt commented 10 years ago

Like I said in class a quick fix would also be to put the path to the git binary when u create the gitWrapper object in the constructor replace $this->wrapper = new GitWrapper(); with $this->wrapper = new GitWrapper('C:\Git\bin\git.exe'); where C:\Git\bin\git.exe is the location of the git binary. Also, as I said spaces in directories will create problems as well. However, this is merely a work around and not a solution.

mikeholler commented 10 years ago

@samuelfrench, please try as I said above and paste the output. It could be easier than Jordan says.

samuelfrench commented 10 years ago

Did you look at the picture I already posted? capture

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\capstone>git
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

The most commonly used git commands are:
   add        Add file contents to the index
   bisect     Find by binary search the change that introduced a bug
   branch     List, create, or delete branches
   checkout   Checkout a branch or paths to the working tree
   clone      Clone a repository into a new directory
   commit     Record changes to the repository
   diff       Show changes between commits, commit and working tree, etc
   fetch      Download objects and refs from another repository
   grep       Print lines matching a pattern
   init       Create an empty Git repository or reinitialize an existing one
   log        Show commit logs
   merge      Join two or more development histories together
   mv         Move or rename a file, a directory, or a symlink
   pull       Fetch from and integrate with another repository or a local bran

   push       Update remote refs along with associated objects
   rebase     Forward-port local commits to the updated upstream head
   reset      Reset current HEAD to the specified state
   rm         Remove files from the working tree and from the index
   show       Show various types of objects
   status     Show the working tree status
   tag        Create, list, delete or verify a tag object signed with GPG

'git help -a' and 'git help -g' lists available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.

C:\Users\capstone>
mikeholler commented 10 years ago

Sorry Sam, guess the first one didn't show up on my phone...

After seeing that I have no ideas. On Mar 14, 2014 4:36 PM, "Samuel French" notifications@github.com wrote:

Did you look at the picture I already posted? [image: capture]https://f.cloud.github.com/assets/5598505/2426119/7492985a-abc0-11e3-91bc-27b84b322062.PNG

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\capstone>git usage: git [--version] [--help] [-C ] [-c name=value] [--exec-path[=]] [--html-path] [--man-path] [--info-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=] [--work-tree=] [--namespace=] []

The most commonly used git commands are: add Add file contents to the index bisect Find by binary search the change that introduced a bug branch List, create, or delete branches checkout Checkout a branch or paths to the working tree clone Clone a repository into a new directory commit Record changes to the repository diff Show changes between commits, commit and working tree, etc fetch Download objects and refs from another repository grep Print lines matching a pattern init Create an empty Git repository or reinitialize an existing one log Show commit logs merge Join two or more development histories together mv Move or rename a file, a directory, or a symlink pull Fetch from and integrate with another repository or a local bran

push Update remote refs along with associated objects rebase Forward-port local commits to the updated upstream head reset Reset current HEAD to the specified state rm Remove files from the working tree and from the index show Show various types of objects status Show the working tree status tag Create, list, delete or verify a tag object signed with GPG

'git help -a' and 'git help -g' lists available subcommands and some concept guides. See 'git help ' or 'git help ' to read about a specific subcommand or concept.

C:\Users\capstone>

Reply to this email directly or view it on GitHubhttps://github.com/CSC495-2014/TeamworkEnglewoodGit/issues/141#issuecomment-37699209 .

mikeholler commented 10 years ago

Oh, actually wait! I do! Check your path variables. Is git in your user's path or in the system path? It should be in the system path. On Mar 14, 2014 4:36 PM, "Samuel French" notifications@github.com wrote:

Did you look at the picture I already posted? [image: capture]https://f.cloud.github.com/assets/5598505/2426119/7492985a-abc0-11e3-91bc-27b84b322062.PNG

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\capstone>git usage: git [--version] [--help] [-C ] [-c name=value] [--exec-path[=]] [--html-path] [--man-path] [--info-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=] [--work-tree=] [--namespace=] []

The most commonly used git commands are: add Add file contents to the index bisect Find by binary search the change that introduced a bug branch List, create, or delete branches checkout Checkout a branch or paths to the working tree clone Clone a repository into a new directory commit Record changes to the repository diff Show changes between commits, commit and working tree, etc fetch Download objects and refs from another repository grep Print lines matching a pattern init Create an empty Git repository or reinitialize an existing one log Show commit logs merge Join two or more development histories together mv Move or rename a file, a directory, or a symlink pull Fetch from and integrate with another repository or a local bran

push Update remote refs along with associated objects rebase Forward-port local commits to the updated upstream head reset Reset current HEAD to the specified state rm Remove files from the working tree and from the index show Show various types of objects status Show the working tree status tag Create, list, delete or verify a tag object signed with GPG

'git help -a' and 'git help -g' lists available subcommands and some concept guides. See 'git help ' or 'git help ' to read about a specific subcommand or concept.

C:\Users\capstone>

Reply to this email directly or view it on GitHubhttps://github.com/CSC495-2014/TeamworkEnglewoodGit/issues/141#issuecomment-37699209 .

samuelfrench commented 10 years ago

The variable username is set to system.

samuelfrench commented 10 years ago

Right need to get a start on my 415 project which is due tomorrow, so I am going to try Jordan's fix a little later tonight and I'll report back. I have a hunch it will work.

samuelfrench commented 10 years ago

@jkwendt That worked, thanks friend!