- The webhook is correctly configured but Cyberpanel doesn’t pull the last commit
I pushed a commit to address a few issues like allow all characters in command box. However, I don’t see other issues you mentioned in v2.0.0 branch
Please upgrade to v2.0.0 branch, also remember that separate your commands with commas. Otherwise, it will be considered one single command.
How do I comma-separate such complex commands? Wouldn’t it be better to separate them with a new line, given the textarea?
I upgraded to 2.0.0.
Now, by clicking on the Manage Git button on the site and selecting the folder to manage I get this error popup:
Operation Failed!
You are not authorized to access this resource.
What do you mean?
Who supply you these commands?
@fliva said:
How do I comma-separate such complex commands? Wouldn’t it be better to separate them with a new line, given the textarea?
Actually the problem is can’t manage git. I got the not authorized error. But i’m logged in as admin
do
rm -rf /home/cyberpanel/git
Then try again.
Fixed. But why it happened?
You were using actively dev branches (v1.9.5). Now, v2.0.0 is not yet officially released but it is out of dev.
I don’t see any issue.
-
You can’t checkout to the currently selected branch, you were already on master so you can’t switch it.
-
When you are setting remote, you see your current remote setup in a textbox, the fields above are used in case you want to change again.
-
The third thing is when you save git configure, I think I can add a fetch function once you save the configurations so they are reflected in real-time. But during dev, I didn’t felt necessary because on backend they are saved and loaded when details of this folder are fetched again or page is reloaded.
I also am experiencing the problem where webhook is correctly configured but CyberPanel does not pull the latest commit. I am on 2.0.0 on CentOS 7, removed my git repo and readded, and have cleared my cache after update. I get a Server Error 500 in GitHub when it tries to deliver the payload.
I still believe that the URL should be
https://:8090/websites//gitNotify
like it used to be. Webhook auto pull used to work this way in an earlier version of CyberPanel. If I use /gitNotify in 2.0.0 instead of /webhook it resolves to
{“pulled”: 1, “error_message”: “None”}
instead of Server Error 500 BUT the pull still does not successfully happen. Cyberpanel main error log reports
[04.01.2020_21-42-30] local variable ‘website’ referenced before assignment [ApplicationInstaller.gitPull]
@fliva said:
5) The webhook is correctly configured but Cyberpanel doesn’t pull the last commit
Please use the new Git Manager from v2.0.0 → https://forums.cyberpanel.net/discussion/comment/8987/#Comment_8987
You are using old version.
Type your comment> @usmannasir said:
Please use the new Git Manager from v2.0.0 → https://forums.cyberpanel.net/discussion/comment/8987/#Comment_8987
You are using old version.
As per my post, I am on v2.0.0. I even downgraded to 1.9.5 and then upgraded to 2.0.0 again. I will try again, though.
Type your comment> @usmannasir said:
Please use the new Git Manager from v2.0.0 → https://forums.cyberpanel.net/discussion/comment/8987/#Comment_8987
You are using old version.
I have updated my CP to v2.0.0 once again, cleared my chrome browser cache, removed the git repo from my website, reattached my repo, added the deploy key, added the recommended webhook URL, and pushed a commit to my repo.
GitHub returns a failed payload due to server error 500.
I tried tried two different push commits. No changes until I manually pulled from the 2.0.0 git manager.
CP main log reports:
[04.02.2020_07-03-00] hello world 2
[04.02.2020_07-05-43] Expecting value: line 1 column 1 (char 0)
[04.02.2020_07-07-02] Expecting value: line 1 column 1 (char 0)
Git Manager webhooks do not automatically pull correctly.
When I try with /gitNotify the CP main log reports:
[04.02.2020_07-11-26] local variable ‘website’ referenced before assignment [ApplicationInstaller.gitPull]
Same behavior as my earlier post. What is the significance of hello world 2? Leftover test?
Are you using a new or old Git Manager?
For new documentation is available at → How to use CyberPanel Git Manager For Complete Automation - Blog Posts - CyberPanel Community
The new manager does not use [ApplicationInstaller.gitPull].
It is necessary that the textarea of the commands is editable and shows the commands active at that moment, so that they can be modified.
In addition, different commands should be divided by the new line characters. Commas are used in some commands, you can’t separate commands like that, look at many other well designed examples like RunCloud or Laravel Forge. Commands are separated by a carriage return.
ok. I will get back to you.
Thanks
Completed
Type your comment> @usmannasir said:
Are you using a new or old Git Manager?
For new documentation is available at → How to use CyberPanel Git Manager For Complete Automation - Blog Posts - CyberPanel Community
The new manager does not use [ApplicationInstaller.gitPull].
I am not using old git manager. I am using the git manager in 2.0.0. I have once again updated via documentation to CP v2.0.0.
I have also removed my git repo, ran
rm -rf /home/cyberpanel/git
and reattached my repo using the new git manager in v2.0.0
Pull is not successful via webhooks using the steps mentioned in
How to use CyberPanel Git Manager For Complete Automation - Blog Posts - CyberPanel Community
GitHub payload failed delivery due to server error 500.
CP main log reports this when I pushed two different commits to my repo.
[04.02.2020_21-36-03] Expecting value: line 1 column 1 (char 0)
[04.02.2020_21-37-07] Expecting value: line 1 column 1 (char 0)
Cross posted issue to
v2.0.0 Failed pull via webhooks in new Git manager · Issue #296 · usmannasir/cyberpanel · GitHub