presslabs / gitium

Keep all your WordPress code on git with a simple plugin and a repo
https://www.presslabs.com/code/gitium/
GNU General Public License v2.0
180 stars 31 forks source link

Cheating uh? on Merge changes #177

Open filipebteixeira opened 5 years ago

filipebteixeira commented 5 years ago

Hi,

When trying to Merge changes, which points to the Webhook, I get the "Cheating uh?" message. Commits from the server to the Gitlab repo is working properly and on the Status I can see a "modified on remote" as well.

Thanks for your help!

pdobrescu commented 5 years ago

Hi @filipebteixeira ,

That message shows up when the check at this line fails:

https://github.com/presslabs/gitium/blob/master/gitium/gitium-webhook.php#L29

In short, that means Gitium doesn't see the correct key and cannot make the pull from the repo. Is it possible that you don't have in your repo the correct key for Gitium? Have you done a key regeneration since the moment you installed Gitium? Or has the site address changed since then?

filipebteixeira commented 5 years ago

Hey,

The initial commit was done successfully yesterday, so I'm assuming that the key is correct, right? I didn't do a key regeneration since then and the site address is the same.

Thanks!

pdobrescu commented 5 years ago

Ok, understood. In this case, can you please try the following:

Let me know if you still have errors after that.

filipebteixeira commented 5 years ago

After performing those steps changes were merged correctly. However, pressing the "Merge changes" button again leds to the same "Cheating uh?" window.

Pedro Dobrescu notifications@github.com escreveu no dia quarta, 15/05/2019 à(s) 08:24:

Ok, understood. In this case, can you please try the following:

  • logout from the site
  • login again
  • deactivate & reactivate Gitium
  • if the automatic merge didn't take place, try to click on the "Merge changes" button or simply copy/paste the webhook in your browser

Let me know if you still have errors after that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/presslabs/gitium/issues/177?email_source=notifications&email_token=AG7IOMRDRIM42NW3LL2B3MDPVO3DRA5CNFSM4HM2Y342YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVNYH3I#issuecomment-492536813, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7IOMWR3WT5MN22MMCY75DPVO3DRANCNFSM4HM2Y34Q .

filipebteixeira commented 5 years ago

I could check that $webhook_key = get_option( 'gitium_webhook_key', '' ); returns empty. If I hardcode the webhook_key on the php file, then the if condition is met, but I get a blank page.

I hope this helps to troubleshoot.

kfathy194 commented 1 year ago

Hello, any updates on this issue? I'm facing the same scenario that happened with @filipebteixeira

Also, follow the steps that @pdobrescu mentioned, but still not fixed.