使用php做github的webhook,如下: $cmd = "eval `ssh-agent -s` && ssh-add && cd $target && git pull 2>&1";
$res = shell_exec($cmd);已經(jīng)添加了ssh key(無密碼),無返回錯(cuò)誤,但不成功。$cmd = "cd $target && git pull 2>&1";會(huì)提示沒有權(quán)限,因?yàn)閼?yīng)該是key沒加載。
- 1 回答
- 0 關(guān)注
- 646 瀏覽
添加回答
舉報(bào)
0/150
提交
取消