我的routes.php代码如下:
Route::get('/pull/{key?}', array('as' => 'install', function($key = null) {
if($key == "JfjkGmn7JUIygNHf8jh&ygnfrYub"){
SSH::run(array(
'cd /var/www/',
'git pull https://myusername:mypass@bitbucket.org/mygroup/myrep.git'
));
echo 'Pull from Bitbucket.org is done... Do not forget to migrate though! <a href="/dashboard">Click here to continue</a>';
} else {
App::abort(404);
}
}));但是我得到了错误InvalidArgumentException in RemoteManager.php line 156: Remote connection [] not defined.。有人能告诉wme何时何地设置连接吗?它应该是本地的,所以我猜我不需要设置它。
发布于 2015-12-09 03:10:54
在Laravel 5中,不再有SSH。有一个单独的包用于此- SSH for Laravel 5,因此请查看文档,您需要在config/remote.php中配置连接。在Laravel4.2中,SSH内置于SSH in Laravel 4.2的框架文档中
https://stackoverflow.com/questions/34162937
复制相似问题