为了账号安全,请及时绑定邮箱和手机立即绑定

用php的shell_exec执行git pull需要github账号密码

用php的shell_exec执行git pull需要github账号密码

PHP
德玛西亚99 2019-02-20 05:38:35
使用php做github的webhook,如下:        $cmd = "eval `ssh-agent -s` && ssh-add && cd $target && git pull 2>&1";         $res = shell_exec($cmd);已经添加了ssh key(无密码),无返回错误,但不成功。$cmd = "cd $target && git pull 2>&1";会提示没有权限,因为应该是key没加载。
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 651 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号