Answer the question
In order to leave comments, you need to log in
Auto-deploy git to server?
I used this solution https://github.com/markomarkovic/simple-php-git-deploy
Everything seems to be registered, but such an error appears
Cloning into '/tmp/spgd-8256c643b03085233140bd5036a79ae3'...
Host key verification failed.
fatal: The remote end hung up unexpectedly
Error encountered!
Stopping the script to prevent possible data loss.
CHECK THE DATA IN YOUR TARGET DIR!
Runs on hosting. ssh key is registered in the git, maybe something else needs to be done?
Answer the question
In order to leave comments, you need to log in
You need CD service. Continous delivery, implementation, for example, jenkins, gitlab-ci, whatever you like.
From the user under which your PHP script is running that you are pulling the webhook, do something like this:
ssh-keygen -R hostname
This will get rid of the problem "Host key verification failed." will be used by your script for authorization, and add the public part of the key to the Deploy keys of your repository settings (at least on github it is called like this, others may be called differently)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question