trilbymedia / grav-plugin-git-sync

Collaboratively Synchronize your Grav `user` folder hosted on GitHub, BitBucket or GitLab
Apache License 2.0
240 stars 58 forks source link

The GitSync plugin requires the (Git) binary to be installed and accessible in order to work. #180

Closed hexclann closed 3 years ago

hexclann commented 3 years ago

Hello, I have some issues while setting up the git sync to work in my Grav installation. I have the latest Grav and git-syc plugin installed on a cpanel server. I followed these steps:

  1. I executed the git --exec-path to determine the git location on the server.
  2. /usr/local/cpanel/3rdparty/libexec/git-core/git is the path to my git installation.
  3. I have added this to Advanced git settings > Git binary path
  4. Even after adding the path I get the The GitSync plugin requires the (Git) binary to be installed and accessible in order to work. error
hexclann commented 3 years ago

Anyone?

w00fz commented 3 years ago

Sometimes the path you get from the console is not same that will be used from the web page. I’ve seen that problem on certain hosting providers.

Try running command -v git and see if there are other git executables that can be used instead.

You can quickly test various paths by creating a simple test_git.phpat the root of your site and have in it:

<?php

$bin = ‘/usr/local/cpanel/3rdparty/libexec/git-core/git’;
exec($bin . ' --version', $output);

print_r $output;

Call your site/test_git.php and see what you get. If still none of this work you might have to ticket your hosting provider to figure out how you can exec git from your web server since it’s not working.

Unfortunately I have never used gitsync with a cpanel environment so I don’t fully know what needs to change but if you figure out please let me know so I can at least add a note in the README about it.

Thanks

Krisselack commented 3 years ago

have a similar issue, can neither access /usr/bin/git or /usr/lib/git-core/git from the admin panel, but git via ssh is available. Update: apparently, my hosting provider is not granting the necessary permissions with the ordered product.