使用compoer update的时候取消安全连接

Share

最近更新laravel, 使用大陆的composer时,由于是http连接而不是https连接,一直报错。这个时候只需要在config中添加”secure-http”:false即可,代码如下:

"config": {
  "preferred-install": "dist",
  "secure-http": false //  
  此行为取消安全连接
},
"repositories": [
  {
    "type": "composer",
     "url": "http://pkg.phpcomposer.com/repo/packagist/"
  },
  {
    "packagist": false
  }
]

 

Leave a Reply

Your email address will not be published. Required fields are marked *