I have an issue with my CI pipeline on GitLab, stage deploy on server Cloudways. The CI deploy correctly in prod... but it failed with error:
error: could not lock config file /home/123456.cloudwaysapps.com/xxxxxxx/.gitconfig: Permission denied
I read it's a problem with .gitconfig.lock, but I don't see any file "gitconfig.lock" or .git config at this path.
What do you think about this, please? What is the error?
deploy:
stage: deploy
before_script:
- apt-get update -y && apt-get install -y git openssh-client
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
script:
- ssh -o StrictHostKeyChecking=no $APP_USER@$APP_HOST "cd public_html/ && git config --global user.name "my-user-name" && git pull origin main && composer dump-autoload && php bin/console d:m:m -n"
only:
- main
The screen here: