Answer the question
In order to leave comments, you need to log in
How to set up auto-deploy?
Here is my error.
I added a private key here:
and gitlab-ci itself:
before_script:
- apt-get update -qq
- apt-get install -qq git
- 'which ssh-agent || ( apt-get install -qq openssh-client )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- git rm --cached .gitlab-ci.yml
- ' && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
deploy_staging:
type: deploy
environment:
name: staging
url: 45.132.18.232
script:
- ssh -A [email protected]45.132.18.232 -p 22 "cd /var/www/zverug.ga/public_html && git checkout master && git pull origin master && composer install && exit"
only:
- master
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question