composer 报ssl 错误

看能不能访问curl https://www.baidu.com
如果能访问, 说明访问是没有问题的。
---------------------
1、composer config -l -g | grep 'home'
2、找到[home],这里的路径就是主目录所在的路径
3、vim config.json文件
4、加入如下文字 {
          "config":
             { "secure-http":false }
      }
----
运行composer的命令是要在相应的目录下才合适的, 貌似composer会去读取当前目录下的composer.json(相当于配置文件)
---
最后更新了一下时间,
我装的ubuntu并没有更新证书, 也没有安装证书, 但一直都在用
---
https://stackoverflow.com/questions/21181231/server-certificate-verification-failed-cafile-etc-ssl-certs-ca-certificates-c
这里面有很多解释的方法, 我最后更新了时间, 希望有效吧。
----

  • composer update is mostly used in the 'development phase', to upgrade our project packages according to what we have specified in the composer.json file,

  • composer install is primarily used in the 'deploying phase' to install our application on a production server or on a testing environment, using the same dependencies stored in the composer.lock file created by composer update.



你可能感兴趣的:(composer 报ssl 错误)