usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.53k stars 591 forks source link

Git pull no longer works after upgrade #258

Closed ryansechrest closed 4 years ago

ryansechrest commented 4 years ago

I setup Git on several websites, but code is no longer pulled when pushed to origin (Github). This is true for existing websites that used to work, and newly setup websites.

I can also confirm that:

Checking 'error-logs.txt', I do see one new entry every time I deploy:

Expecting value: line 1 column 1 (char 0)

usmannasir commented 4 years ago

touch /usr/local/CyberCP/debug

What you see in error logs then?

ryansechrest commented 4 years ago

That command doesn't print anything out. The 'debug' file has size 0.

If I run tail /home/cyberpanel/error-logs.txt, I just see one entry per each time I pushed to origin:

Expecting value: line 1 column 1 (char 0)

That's all it shows.

usmannasir commented 4 years ago

after doing touch /usr/local/CyberCP/debug push to origin and see what you have in tail /home/cyberpanel/error-logs.txt

ryansechrest commented 4 years ago

I ran touch /usr/local/CyberCP/debug under root, made a commit in the project and pushed to origin, hook fired, and a new line was added to error-logs.txt that is the same as before:

Expecting value: line 1 column 1 (char 0)

usmannasir commented 4 years ago

ok, I will test and get back to you.

usmannasir commented 4 years ago

https://github.com/usmannasir/cyberpanel/commit/5631ed73d4c750c7a219c51263ef0d10ad4c8941

When adding webhook in GitHub, make sure to disable SSL verification because by default cyberpanel is on self-signed SSL, so if SSL verification is on, git pull will not work.

ryansechrest commented 4 years ago

I don't think that's the issue, because it was working with SSL verification before. I don't use the IP address of the server, but I setup a hostname SSL via Let's Encrypt, and I replaced the IP address with hostname in the webhook. I also don't see any SSL errors in the delivery status on Github.

ryansechrest commented 4 years ago

@usmannasir For testing, I did disable SSL verification, but the issue remains.

ryansechrest commented 4 years ago

I just thought to check the GitHub response when the payload is sent. This is what CyberPanel sends back:

{"pulled": 0, "error_message": "'tempStatusPath'"}
usmannasir commented 4 years ago

After my last commit did you upgrade again? I've fixed this issue.

ryansechrest commented 4 years ago

I overlooked the commit you posted, and hadn't upgraded. I just upgraded and now it works again. Thank you for addressing this so quickly!