Edrick Smith

Active Member
Oct 9, 2017
41
5
8
Boston, MA
cPanel Access Level
DataCenter Provider
So I have a private Github that I've susscesfully setup SSH access connection between cPanel and GIT. However I'm having an issue where anytime I go to deploy head commit it just sits at "The deployment that you triggered on Feb 24, 2021 TIME is queued …"

Sometimes it seems to work, most of the time it just hangs. So I'm guessing something isn't setup correctly. So I suppose a few questions;

1) Is there a way to set cpanel to automatically pull the changes on GIT and pull down to the server? It seems that's suppose to be a function but I guess I'm missing how to set it up?
2) How do I view the logs of the git attempts in order to troubleshoot why its hanging
3) For some reason it's deploying to a subdirectory

The cpanel yml file is as follows;

# ---
# deployment:
# tasks:
# - export DEPLOYPATH=/home/CPANELUSER/public_html/
# - /bin/cp -R /home/CPANELUSER/repositories/GITNAME $DEPLOYPATH
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,399
553
273
cPanel Access Level
Root Administrator
Hey there! Can you check the following logs to see if those give any additional details on the situation?

  • /usr/local/cpanel/logs/error_log — Errors and stack traces.
  • /home/username/.cpanel/logs/user_task_runner.log — Queue-related items.
  • /home/username/.cpanel/logs/vc_TIMESTAMP_git_create.log — Creation-related issues, where TIMESTAMP represents the time of the operation.
  • /home/username/.cpanel/logs/vc_TIMESTAMP_git_deploy.log — Deployment-related issues, where TIMESTAMP represents the time of the operation.
Those are taken from our documentation here:

 

Edrick Smith

Active Member
Oct 9, 2017
41
5
8
Boston, MA
cPanel Access Level
DataCenter Provider
Hey there! Can you check the following logs to see if those give any additional details on the situation?

  • /usr/local/cpanel/logs/error_log — Errors and stack traces.
  • /home/username/.cpanel/logs/user_task_runner.log — Queue-related items.
  • /home/username/.cpanel/logs/vc_TIMESTAMP_git_create.log — Creation-related issues, where TIMESTAMP represents the time of the operation.
  • /home/username/.cpanel/logs/vc_TIMESTAMP_git_deploy.log — Deployment-related issues, where TIMESTAMP represents the time of the operation.
Those are taken from our documentation here:

There we go;

2021-02-23T18:01:13Z: FAILURE: (XID fgd4hd) The system failed to read from the file “/home/CPANELUSER/repositories/REPO/.cpanel.yml” because of an error:
2021-02-23T18:01:13Z: Queue empty, terminating
2021-02-23T18:07:21Z: Processing 00000000/60354459808f65...
2021-02-23T18:07:21Z: doing Cpanel::UserTasks::VersionControl::deploy
2021-02-23T18:07:21Z: FAILURE: (XID jv2j7v) The system failed to read from the file “/home/ctv47/REPO/c47tv/.cpanel.yml” because of an error:
2021-02-23T18:07:21Z: Queue empty, terminating
2021-02-24T21:17:23Z: Processing 00000000/6036c26399d70f...
2021-02-24T21:17:23Z: doing Cpanel::UserTasks::VersionControl::deploy
2021-02-24T21:17:23Z: FAILURE: (XID yazzh6) The system failed to read from the file “/home/CPANELUSER/repositories/c47tv/.cpanel.yml” because of an error:
2021-02-24T21:17:23Z: Queue empty, terminating

So it seems to be stopping "because of an error"

1614201443.92696
fatal: invalid yaml format.


So I guess the question now becomes what's formatted incorrectly hmm
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,399
553
273
cPanel Access Level
Root Administrator
Progress! The docs on this page have an example .yml file you may want to reference:


Can you check that and see if you can spot anything odd in yours?
 

Edrick Smith

Active Member
Oct 9, 2017
41
5
8
Boston, MA
cPanel Access Level
DataCenter Provider
So I was able to get the GIT to pull successfully, one question how would I specify that instead of pulling the full GIT repository it just pulls the "public" folder from that GIT? So the issue we're having is that its pulling all the build files plus the public folder. Where as the contents of the public folder on GIT are the only things that need to be pulled into public_html
---
deployment:
tasks:
- export DEPLOYPATH=/home/cpaneluser/public_html/
- /bin/cp -R public $DEPLOYPATH

So I'm a bit confused as to what I would modify to only pull say /NAMEOFREPOSITORY/public where as right now its pulling the full repository Ive got it to just pull the public folder, but I want that folders content deployed into public_html
 
Last edited: