有一个运行 Satis 的命令:php bin/satis build satis.json response
Satis 本身位于服务器上,例如,example.com/satis
如何远程在服务器上运行命令?
我尝试用该命令制作脚本,shell_exec('php bin/satis build satis.json response/')
但在Satis无法登录Git时遇到错误:
Scanning packages
Failed to clone the git@gitlab.com:project/project.git repository, try running in interactive mode so that you can enter your credentials
In Git.php line 354:
Failed to execute git clone --mirror 'git@gitlab.com:project/project
.git' '/var/www/.composer/cache/vcs/git-gitlab.com-project.git/'
Cloning into bare repository '/var/www/.composer/cache/vcs/git-gitlab.com-project.git'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
build [--repository-url [REPOSITORY-URL]] [--repository-strict] [--no-html-output] [--skip-errors] [--stats] [--] [ [ [...]]]
哪里有问题?