Unable to deploy with shell to the same machine

I am very new to this gitlab thing so I probably ask something very stupid. please don’t shoot.

  • I installed GitLab and I created a runner, and he has a nice green dot.
  • I installed Apache2 on port 1818 next to GitLab to serve /var/www

So now I went on to create my first deploy but for some reason it always fails.

What I want to do is to git clone to /var/www the branch I created ( in order to see them in the web browser)

here is my script :

stages:
  - deploy

deploy-to-webfolder:
  stage: deploy
  script:
    - echo "Deploy to production server"
    - cd /var/www/
    - rm -r deployfolder
    - pwd
    - mkdir /var/www/deployfolder
    - git clone -l -v my-project /var/www/deployfolder/

What is wrong?

Hi @newbie1
output from the Job would help, but my guess would be permissions. If you can provide the output from the Job we can narrow the cause a little bit more.

thanks for the hint, it really was a permission thing