I got some spare time:
How I fix the problem:
My hosting company already got Git installed below my own website. When I sign in via SSH and run different commands everything works great. But when revisr tries to execute exactly the same commands it returns error code 127 (no command found). I was able to install a new version of Git (2.2.0) but when I run commands via SSH they are still executed on the old Git.
My solution
Revisr tries to get a path via “git parse res ––show–toplevel
” but this only returns my public_html path and could not execute any commands. My solution was to force the plugin to execute via my new installation. I changed the path from: “/storage/content/6*/13****/vindpust.com/public_html/” to my new git “/storage/content/6*/13****/bin/git “ (this is where Git 2.2.0 is located on my server).
I made this changed on three places in the class-revisr-git.php file:
function current_dir()
public function current_dir() {
$dir = exec( '/storage/content/62/135262/bin/git rev-parse --show-toplevel' );
if ( $dir ) {
return $dir;
} else {
return ABSPATH;
}
}
function is_repo()
public function is_repo() {
exec( '/storage/content/62/135262/bin/git rev-parse --show-toplevel', $output, $error );
if ( $error ) {
return false;
} else {
return true;
}
}
function run()
public function run( $command, $callback = '', $args = '' ) {
// Run the actual Git command.
$cmd = ( "/storage/content/62/135262/bin/git $command" );
//$cmd = escapeshellcmd( "git $command" );
$dir = getcwd();
chdir( $this->dir );
exec( $cmd, $output, $error );
chdir( $dir );
// If using a callback, initiate the callback class and call the function.
if ( $callback != '' ) {…
And now everything works!
Is it possible that you can add a source box for the git installation? Like the one to the database in further updates? That would help me alot!
Thank you!
If something is strange or missing just post a comment!