Hello,
Is the parent “.git” directory writeable by www-data as well?
Thread Starter
ssirag
(@ssirag)
OK…I’ve resolved the local permissions issue…now however it seems to be having a remote authentication issue. I get “Error pushing to the remote repository. The remote repository could be ahead, or there may be an authentication issue.”
From the root command prompt, however, I can run a full commit and push cycle with no issues.
I’ve added the private key that authenticates this server with bitbucket in the /var/www/vhosts/.ssh directory. Is that the right location?
Hello,
For the sake of troubleshooting, can you please confirm if the HTTPS method as mentioned here works for you?
Thread Starter
ssirag
(@ssirag)
Same error when using the https URL of the repo.
Hi,
Was this repo created within Revisr, or was it created manually?
Sorry for all of the questions, but there are a few possible reasons for this occurring and the answers will hopefully point us in the right direction.
Let me know, thanks!
Thread Starter
ssirag
(@ssirag)
The local repo was created via command line.
Hi ssirag,
If you’re having issues with Revisr and it’s working normally via command line, 99% of the time it’s because of either permissions (and it sounds like you resolved that) or the enivronment path to isn’t available to Apache (or NGINX if you’re using that).
If possible, I’d create a test file with the below:
<?php echo exec( 'which git' ); ?>
And add it to your WordPress install, then visit in the browser. If it returns nothing, then it’s a path issue.
I wonder if having all of those files owned by root could be causing the issue, or did you change that?
Thread Starter
ssirag
(@ssirag)
Everything is owned by www-data…
the ‘which git’ function returns:
/usr/bin/git
Thread Starter
ssirag
(@ssirag)
OK, we got it working. Found 2 specific issues:
1. I had an “@” in my bitbucket password, which is why the https config was failing.
2. As we were dealing with an existing repo, we had to run this on the local server repo in order to get it working first time:
git fetch –all
git reset –hard origin/master
Hi,
Glad you were able to get this resolved. Will definitely look further into the “@” character causing an issue with your password, and I’ve created an issue here to make sure it’ll be addressed for next release.
Will also look further into #2, as I normally don’t have to do that and a “Pull Changes” from within Revisr normally is sufficient to get the local even with the remote. Did you try that first by any chance and it still didn’t work?
Thread Starter
ssirag
(@ssirag)
Yes, I tried to pull first but it wouldn’t overwrite the local files until i did the hard reset.