Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

The system cannot deploy error from GIT repo

Discussion in 'General Discussion' started by SP Hosting, Jan 24, 2019.

  1. SP Hosting

    SP Hosting Registered

    Joined:
    Jan 24, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OR
    cPanel Access Level:
    Root Administrator
    I delete the GIT repo and re-did it so many times + tried to create the .cpanel.yml many times but it keeps not working. Does .cpanel.yml need to have certain permissions, I can't figure out whats wrong. Here is the message:

    The system cannot deploy
    For deployment, ensure that your repository meets the following requirements:

    1. A valid .cpanel.yml file exists. For more information, read our documentation.
    2. No uncommitted changes exist on the checked-out branch.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,313
    Likes Received:
    2,157
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @SP Hosting,

    Can you post the contents of the .cpanel.yml file you have setup? Ensure to replace any identifying information about your server with an example.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SP Hosting

    SP Hosting Registered

    Joined:
    Jan 24, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OR
    cPanel Access Level:
    Root Administrator
    Just to clarify my GIT repo is directly in the public_html folder, so that is where that file is placed.. Also I have tried several different things in there. But here is whats in it now:

    .cpanel.yml
    ---
    deployment:
    tasks:
    - export DEPLOYPATH=/home/cPuser/public_html
    - /bin/cp -r * $DEPLOYPATH
     
  4. SP Hosting

    SP Hosting Registered

    Joined:
    Jan 24, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OR
    cPanel Access Level:
    Root Administrator
    Does anyone have any ideas on what could be wrong?
     
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,313
    Likes Received:
    2,157
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @SP Hosting,

    The use of a wildcard character, such as an asterisk to deploy all files, is not recommended. Also, if your deploy path is the same directory as the repo, the command you are using would simply copy all files to the same location. Start by moving your Git repo to a directory above public_html (e.g. /home/username/gitrepo), create a directory named "testing" with a couple of test files, and then update the /home/username/gitrepo/.cpanel.yml file to look like this:

    Code:
    ---
    deployment:
      tasks:
        - export DEPLOYPATH=/home/username/public_html/
        - /bin/cp -R /home/username/gitrepo/testing $DEPLOYPATH
    Verify this works first, and we can proceed to assist you with tuning the custom deployment command.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice