[v1.7-dev] Attach Git to your CyberPanel sites! - Page 2 — CyberPanel - WebHosting Control Panel for OpenLiteSpeed

[v1.7-dev] Attach Git to your CyberPanel sites!



  • When i try to follow the installation steps I get
    "/dev/fd/63: line 1: syntax error near unexpected token `newline'
    /dev/fd/63: line 1: `<!DOCTYPE html>'"
    in the command line.
  • @xurjob sorry?

    Has attaching Git repos to CyberPanel sites been working for version 1.9? Just recently had to reinstall my entire cyberpanel instance after a bad upgrade and noticed this new feature. But it doesn't work properly after succesfully git attachment. Constantly get the "Permission denied (public key)" error message when the use the cyberpanel provided deploy key. Only got it to work when I ssh-keygen as root but that doesn't allow me to use the webhooks from cyberpanel.
  • it was working for me before. but recently stopped. now I can see successful webhook call from GitHub log, 200, {"error_message": "None", "pulled": 1}. but it doesn't pull. but if I do it manually (git pull) from the public_html folder, it works.
  • @pb007

    I just tried on Centos 7 and everything seems to work fine including web hooks.
  • I am running it on CentOS 7.6 x64. I can manually go to the public_html folder to do "git pull" and it works, so the keys are fine, etc. and there are no obvious error from calling the webhook neither. any suggestion on where I can look for other logs, etc?
  • just had a chance to setup a new website to test this again. using latest 1.9 build 1. attach git to a freshly created website will say it was successful, but it won't set the content to the repo's. it will still have the cyberpanel default page. then I tried to remove the public_html folder and recreate. I can do a git clone to the repo. so the keys are all fine. on the GitHub side, the webhook log, 200, {"error_message": "None", "pulled": 1}, every time I commit new code. but it won't be pulled to the server. still wanting to know where I can find the logs.
  • finally got it working. installed another vps and it all worked fine. I went back to check back on the old server, somehow the deploy keys was different. I have not reinstalled the old server at all, but the deploy keys updated itself. with the wrong deploy keys, will still get 200, {"error_message": "None", "pulled": 1} from GitHub. so just detach the old git setup, check the keys and attach again.
  • I'm trying to clone a Gitlab repository but Cyberpanel keeps giving me this error: "Error message: . [404]"

    The repository to clone is https://gitlab.com/f_liva/statamic-alithia, then from the page https://<IP Address>:8090/websites/<Website>/setupGit I set "f_liva" in the Username field, "statamic-alithia" in the Repository Name field and than select Gitlab (no feedback at click).

    I proceed to the next page by clicking on the Attach Now button, then after a few moments appears the red box with "Error message: . [404]"

    On Gitlab I have correctly set the Deploy Key from the Repository > Settings > CI / CD > Deploy Keys page.

    What am I doing wrong?
  • @fliva

    I've added an extremely improved Git Manager. Run upgrade code and upgrade to v1.9.5.

    Then go to Websites -> List Websites -> Manage -> Manage Git

    Then click Attach Existing repo, most of the features are complete. I am adding a few more.

    Remember to clear browser cache after upgrading, before releasing v1.9.5 officially there will be proper documentation to use each feature in the Git Manager.
  • I don't understand, can I already upgrade to 1.9.5 or should I wait for the official release? Anyway, do you have any idea why you're showing me this error?
  • When you upgrade using -> https://cyberpanel.net/docs/upgrading-cyberpanel/

    It will ask for version number, input 1.9.5. You will switch to the beta branch with a new Git Manager.
  • Is beta usable for production currently?
  • So far no major bug reports from our internal testing. But I would not recommend to run on already running stable server with many sites for now.

    However for older git integration if there are any bugs, I will not release any bug fixes because it is replaced with new Git manager.
  • edited March 2020
    In case I have problems with 1.9.5 can I downgrade to 1.9.4?
  • Yes, you can downgrade using the same method I mentioned above.
  • Will it be a secure method or will it cause server problems?
  • It is safe, you can upgrade or switch versions.
  • So, I tried to upgrade choosing the 1.9.5 at the version select but, after process, from the backend I see that I'm on version 1.9 build 4E

    It seems there is no way to switch to 1.9.5. What I'm wrong?
  • @fliva

    Fixed the version number display with this commit -> https://github.com/usmannasir/cyberpanel/commit/59683599f4fdd2e354a764fc9c213734734a0ca5

    Along with the completion of viewing changes of the file in certain commit.

    You can run upgrade again and input 1.9.5
  • I've upgraded to 1.9.5E but can't see the new Git Manager
  • Do yo know why I can't see the new Git manager?
  • @fliva

    Added documentation -> https://cyberpanel.net/docs/how-to-use-git-manager-in-cyberpanel/

    Before using the feature better upgrade again to v1.9.5 branch to get the updated code.
  • Yes the Gitlab integration now works fine.

    Can't anyway find the area where to put the automated scripts to run after each commit
  • @fliva
    Sorry going to add now.
  • Added -> https://github.com/usmannasir/cyberpanel/commit/595fc6f525232e98556c3aad13ae05b264440d77

    You can specify commands using Git configure. (You will have to upgrade and clear browser cache)
  • I leave you some feedbacks, this is my deployment script:

    git merge
    /usr/local/lsws/lsphp74/bin/php /user/bin/composer install --prefer-dist -n -o
    yarn install --no-progress --silent --non-interactive
    npm run prod --silent

    curl -X DELETE "https://api.cloudflare.com/client/v4/zones/062b88abd0d8ffe89d684a804228b8d1/purge_cache" \
    -H "X-Auth-Email: [email protected]" \
    -H "X-Auth-Key: f46411e1819b260ba358fbb8c06c7eef845ca" \
    -H "Content-Type: application/json" \
    --data '{"purge_everything":true}'

    1) Can't save the Repo Settings window, and that error message appears:
    Operation Failed!
    Data supplied is not accepted, following characters are not allowed in the input ` $ & ( ) [ ] { } ; : ‘ < >.

    But in the commands text area I should be able to put ALL characters I want, elsewhere I can't for example purge the CloudFlare cache (that require json data in the request)

    2) Run Commands when Webhook is fired. Currently: False still remains to False also if the checkbox is selected.

    3) Refreshing the manageGit page and reopening the Configure popup, the commands and previously set fields are RESET, blank values for all.

    4) Refreshing the manageGit page I MUST reconfigure the Git Host, Username and Repo Name clicking on View/Steup Remote button, elsewhere I got an error selecting the Branch.
  • 5) The webhook is correctly configured but Cyberpanel doesn't pull the last commit
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!