首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在远程服务器上运行Satis?

如何在远程服务器上运行Satis?
EN

Stack Overflow用户
提问于 2019-12-04 13:49:20
回答 1查看 209关注 0票数 1

有一个命令可以运行Satis:php bin/satis build satis.json response

Satis本身位于服务器上,例如example.com/satis

如何在服务器上远程运行命令?

我试着用命令shell_exec('php bin/satis build satis.json response/')写一个脚本,但是遇到了一个错误,因为Satis无法登录到Git:

代码语言:javascript
复制
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] [--] [ [ [...]]]

问题出在哪里?

EN

回答 1

Stack Overflow用户

发布于 2019-12-04 13:55:43

主机密钥验证失败。

执行您的命令的用户可能与在服务器上管理satis的用户不同。

这意味着$HOME不同,而$HOME/.ssh/known_hosts (用于验证远程主机的主机密钥)不在那里或不同。

至少尝试使用shell_exec('id -a; env')来查看通过shell_exec()调用看到的用户/环境。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59169654

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档