• Operating System Linux
    Exec() Enabled true
    Git Install Path Not Found
    Git Version Unknown
    MySQL Install Path Not Found
    Repository Status No repository detected.

    ‘which git’ returns /usr/bin/git so I’ve got

    define( ‘REVISR_GIT_PATH’, ‘/usr/bin/git’ );

    in my wp-config.php but that doesn’t seem to have fixed the issue as I continue to receive the “Failed to initialize a new repository. Please make sure that Git is installed on the server and that Revisr has write permissons to the WordPress install.” error when clicking on the create repository button on the Revisr dashboard.

    Not sure if it matters, but I was able to back up the database successfully from the dashboard.

    Any clues?

    https://wordpress.org/plugins/revisr/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Expanded Fronts

    (@expandedfronts)

    Hi,

    Just to be sure, does the “Git Version” still say unknown after defining the “REVISR_GIT_PATH” in your wp-config? If so, that would indicate an incorrect path.

    If that’s not the issue, it could be that Revisr isn’t able to write to the server; you may have some luck creating the repo manually, and then making sure that the user running Apache has read and write permission to the “.git” directory and all subfiles.

    Thread Starter Flashwit

    (@flashwit)

    Hmm yeah, nothing has changed on the Help tab since defining the path. So this most likely means an incorrect path still?

    I’ll try and figure out where it’s hiding then although it seems like it should be right.

    Thread Starter Flashwit

    (@flashwit)

    I tried manually running ‘git init’ in the folder that has wp-config in it but Revisr doesn’t seem to be detecting that either. Is that where that should be run?

    Plugin Author Expanded Fronts

    (@expandedfronts)

    Yes, that would be the correct place to run it.

    It still seems as if the user running apache doesn’t have access to git at all – you can test the git path with the following:

    <?php
    // test.php
    
    // This returns your current user.
    echo 'User: ' . exec( 'whoami' );
    
    // This returns an array containing the provided path and 0 if successful.
    exec( 'which /usr/bin/git 2>&1', $output, $return );
    var_dump( $output );
    var_dump( $return );

    Can you let me know what the above outputs when ran from browser? Otherwise feel free to shoot an email to support@expandedfronts.com if you want help troubleshooting this further.

    Thread Starter Flashwit

    (@flashwit)

    It’s running as my ftp user which definitely has access to everything.

    On the other hand, the which command is not available which makes me suspect that GoDaddy has disabled a ton of stuff for their shared hosting plans.

    Sorry about saying that ‘which git’ has previously returned the path I noted above as that is what I had been told by someone else involved in our website.

    I have however now run ‘whereis git’, ‘type git’, etc. and they all say ‘/usr/bin/git’ so it must be correct. It’s possible then that Revisr will simply not be able to run since it may use commands via exec that GoDaddy has disabled.

    Thread Starter Flashwit

    (@flashwit)

    I may not know exactly what I’m doing, but I did try running the code again that you showed but I just replaced the ‘which /usr/bin/git’ section with just ‘git’ and it still said the command wasn’t found.

    <?php echo exec( 'whoami' ); 
    
    exec( 'git 2>&1', $output, $return );
    var_dump( $output );
    var_dump( $return );?>

    Output

    safew0rdarray(1) { [0]=> string(26) "sh: git: command not found" } int(127)

    safew0rd is the username of the ftp account

    But yeah, you’re right, the user seems to have no idea that git is installed. For fun, I installed Gitium to see what it would say, and it also has no idea where git is.

    Plugin Author Expanded Fronts

    (@expandedfronts)

    Hi,

    Can you please let me know which hosting plan this is on GoDaddy?

    Thread Starter Flashwit

    (@flashwit)

    It’s the Economy Linux Hosting plan.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Unable to create repository’ is closed to new replies.