V
V
Vadim2018-12-28 14:51:28
PHP
Vadim, 2018-12-28 14:51:28

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

3 answer(s)
M
metajiji, 2018-12-28
@metajiji

You need CD service. Continous delivery, implementation, for example, jenkins, gitlab-ci, whatever you like.

R
Roma, 2018-12-29
@B_Roma

We recently set up auto-deploy with gitlaba using https://deployer.org/

S
SagePtr, 2018-12-29
@SagePtr

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 question

Ask a Question

731 491 924 answers to any question