【问题标题】:"stdin is not a terminal" when run Laravel Envoy tasks运行 Laravel Envoy 任务时“stdin 不是终端”
【发布时间】:2015-05-06 15:45:08
【问题描述】:

一个月后,所有命令都运行良好,但现在...

当我尝试运行envoy run deploy

@servers([
    'mt' => 'user@xxxx.xxxx.xxxx'
])

@task('deploy', ['on' => 'mt'])
    cd /var/www/html/xxx.xxxxxx.xxxx
    git pull origin dev
    composer dump-autoload -o
    php artisan cache:clear
@endtask

我得到这个错误:

git:(dev) ✗ envoy run deploy
[]: Pseudo-terminal will not be allocated because stdin is not a terminal.
[]: ssh: Could not resolve hostname bash -s: nodename nor servname provided, or not known

我把我id_rsa.pub的内容放到服务器authorized_keys里,正常登录就可以了,比如:ssh user@xxx.xxx.xxx——不用密码也可以登录。

那么...我做错了什么?


我正在使用:

  • php 5.6
  • zsh + oh-my-zsh
  • iTerm 2
  • 优胜美地

如果您需要更多详细信息,请在投票后告诉我。

谢谢。

【问题讨论】:

  • 您是在交互式外壳中运行envoy run deploy 命令,还是通过其他方式?例如:ssh foo@bar envoy run deploy?
  • 直接。我在 iTerm 2 中使用 zsh + oh-my-zsh。

标签: php macos laravel ssh laravel-envoy


【解决方案1】:

我找到了解决方案,但我仍然认为不是这样。

这是我的代码:

@servers([
    'mt' => 'user@xxxx.xxxx.xxxx'
])

解决办法:

@servers(['mt' => 'user@xxxx.xxxx.xxxx'])

服务器函数必须是整个内联

谢谢你们的时间!

【讨论】:

    猜你喜欢
    • 2017-10-06
    • 2011-10-30
    • 1970-01-01
    • 2011-06-07
    • 1970-01-01
    • 2019-02-23
    • 1970-01-01
    • 2022-11-23
    相关资源
    最近更新 更多