Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Deployment 带有特使的私有Github存储库_Deployment_Laravel Envoy - Fatal编程技术网

Deployment 带有特使的私有Github存储库

Deployment 带有特使的私有Github存储库,deployment,laravel-envoy,Deployment,Laravel Envoy,在使用私人Github回购协议时,有人在部署Laravel的特使时遇到任何问题吗 从生产服务器手动克隆我的repo时,ssh密钥似乎是可以访问的,但在使用envegate时,我总是会遇到“权限被拒绝(publickey)”错误 谢谢,这可能是因为远程服务器上的ssh密钥需要密码 如果更改特使.blade.php以执行其他任务,您应该能够确定是否正确连接到远程设备 @servers(['web' => 'user@domain.com']) @task('deploy') cd

在使用私人Github回购协议时,有人在部署Laravel的特使时遇到任何问题吗

从生产服务器手动克隆我的repo时,ssh密钥似乎是可以访问的,但在使用envegate时,我总是会遇到“权限被拒绝(publickey)”错误


谢谢,这可能是因为远程服务器上的ssh密钥需要密码

如果更改
特使.blade.php
以执行其他任务,您应该能够确定是否正确连接到远程设备

@servers(['web' => 'user@domain.com'])

@task('deploy')
    cd /path/to/site
    git status
@endtask
应该返回如下内容:

[user@domain.com]: On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
如果您使用Mac或Linux进行连接,您可能不必输入密码,因为您的终端使用的是
ssh-agent
,它会以静默方式处理您的身份验证

通过ssh连接时,ssh代理未运行,并且会提示脚本输入密码,这是它失败的地方

要解决这个问题,您可以在远程计算机上生成一个不使用密码的新密钥


如果您想将ssh密钥限制在GitHub上的单个存储库中,请查看一下ssh字符串中的,您需要传递-a(根据手册页,它启用认证代理连接的转发。这也可以在配置文件中按主机指定)

您还需要为代理转发添加ssh密钥(在可以访问git remote的机器上,我假设这是您的本地主机)

像这样的

@servers(['web' => '-A user@domain.com'])

@task('deploy')
 cd /path/to/site
 git status
@endtask
Git远程命令现在应该可以工作了

@servers(['web' => '-A user@domain.com'])

@task('deploy')
 cd /path/to/site
 git status
@endtask