{"id":245,"date":"2016-11-02T17:39:36","date_gmt":"2016-11-02T09:39:36","guid":{"rendered":"http:\/\/www.shenmdyw.com\/?p=245"},"modified":"2016-11-02T17:55:07","modified_gmt":"2016-11-02T09:55:07","slug":"composer","status":"publish","type":"post","link":"http:\/\/www.shenmdyw.com\/index.php\/2016\/11\/02\/composer\/","title":{"rendered":"composer\u9047\u5230Your configuration does not allow connection to http:\/\/\u7684\u95ee\u9898\u600e\u4e48\u89e3\u51b3"},"content":{"rendered":"<p>\u9519\u8bef:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\"> Your configuration does not allow connection tohttps:\/\/packagecontrol.io\/channel_v3.json See https:\/\/getcomposer.org\/doc\/06-config.md#secure-http for details.<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.shenmdyw.com\/wp-content\/uploads\/2016\/11\/1339857098-56d54f97e5ddc_articlex.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-248\" src=\"http:\/\/www.shenmdyw.com\/wp-content\/uploads\/2016\/11\/1339857098-56d54f97e5ddc_articlex-300x136.png\" alt=\"1339857098-56d54f97e5ddc_articlex\" width=\"580\" height=\"263\" srcset=\"http:\/\/www.shenmdyw.com\/wp-content\/uploads\/2016\/11\/1339857098-56d54f97e5ddc_articlex-300x136.png 300w, http:\/\/www.shenmdyw.com\/wp-content\/uploads\/2016\/11\/1339857098-56d54f97e5ddc_articlex.png 642w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5:<\/p>\n<p>\u6709\u4e24\u79cd\u65b9\u5f0f\u542f\u7528\u672c\u955c\u50cf\u670d\u52a1\uff1a<\/p>\n<ul>\n<li><strong>\u7cfb\u7edf\u5168\u5c40\u914d\u7f6e\uff1a<\/strong> \u5373\u5c06\u914d\u7f6e\u4fe1\u606f\u6dfb\u52a0\u5230 Composer \u7684\u5168\u5c40\u914d\u7f6e\u6587\u4ef6 <code>config.json<\/code> \u4e2d\u3002\u89c1<a href=\"http:\/\/www.shenmdyw.com\/index.php\/2016\/11\/02\/composer\/#tip1\">\u201c\u4f8b1\u201d<\/a><\/li>\n<li><strong>\u5355\u4e2a\u9879\u76ee\u914d\u7f6e\uff1a<\/strong> \u5c06\u914d\u7f6e\u4fe1\u606f\u6dfb\u52a0\u5230\u67d0\u4e2a\u9879\u76ee\u7684 <code>composer.json<\/code> \u6587\u4ef6\u4e2d\u3002\u89c1<a href=\"http:\/\/www.shenmdyw.com\/index.php\/2016\/11\/02\/composer\/#tip2\">\u201c\u4f8b2\u201d<\/a><\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p><a id=\"tip1\"><\/a><strong>\u4f8b1\uff1a\u4fee\u6539 composer \u7684\u5168\u5c40\u914d\u7f6e\u6587\u4ef6<span class=\"text-success\">\uff08\u63a8\u8350\u65b9\u5f0f\uff09<\/span><\/strong><\/p>\n<p>\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff08windows\u7528\u6237\uff09\u6216\u63a7\u5236\u53f0\uff08Linux\u3001Mac \u7528\u6237\uff09\u5e76\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">composer config -g repo.packagist composer https:\/\/packagist.phpcomposer.com<\/pre>\n<p><a id=\"tip2\"><\/a><strong>\u4f8b2\uff1a\u4fee\u6539\u5f53\u524d\u9879\u76ee\u7684 <code>composer.json<\/code> \u914d\u7f6e\u6587\u4ef6\uff1a<\/strong><\/p>\n<p>\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff08windows\u7528\u6237\uff09\u6216\u63a7\u5236\u53f0\uff08Linux\u3001Mac \u7528\u6237\uff09\uff0c\u8fdb\u5165\u4f60\u7684\u9879\u76ee\u7684\u6839\u76ee\u5f55\uff08\u4e5f\u5c31\u662f<code>composer.json<\/code> \u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff09\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">composer config repo.packagist composer https:\/\/packagist.phpcomposer.com<\/pre>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u5c06\u4f1a\u5728\u5f53\u524d\u9879\u76ee\u4e2d\u7684 <code>composer.json<\/code> \u6587\u4ef6\u7684\u672b\u5c3e\u81ea\u52a8\u6dfb\u52a0\u955c\u50cf\u7684\u914d\u7f6e\u4fe1\u606f\uff08\u4f60\u4e5f\u53ef\u4ee5\u81ea\u5df1\u624b\u5de5\u6dfb\u52a0\uff09\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">\"repositories\": { \"packagist\": { \"type\": \"composer\", \"url\": \"https:\/\/packagist.phpcomposer.com\" } }<\/pre>\n<p>\u4ee5 laravel \u9879\u76ee\u7684 <code>composer.json<\/code> \u914d\u7f6e\u6587\u4ef6\u4e3a\u4f8b\uff0c\u6267\u884c\u4e0a\u8ff0\u547d\u4ee4\u540e\u5982\u4e0b\u6240\u793a\uff08\u6ce8\u610f\u6700\u540e\u51e0\u884c\uff09\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">{\r\n    \"name\": \"laravel\/laravel\",\r\n    \"description\": \"The Laravel Framework.\",\r\n    \"keywords\": [\r\n        \"framework\",\r\n        \"laravel\"\r\n    ],\r\n    \"license\": \"MIT\",\r\n    \"type\": \"project\",\r\n    \"require\": {\r\n        \"php\": \">=5.5.9\",\r\n        \"laravel\/framework\": \"5.2.*\"\r\n    },\r\n    \"require-dev\": {\r\n        \"fzaninotto\/faker\": \"~1.4\",\r\n        \"mockery\/mockery\": \"0.9.*\",\r\n        \"phpunit\/phpunit\": \"~4.0\",\r\n        \"symfony\/css-selector\": \"2.8.*|3.0.*\",\r\n        \"symfony\/dom-crawler\": \"2.8.*|3.0.*\"\r\n    },\r\n    \"autoload\": {\r\n        \"classmap\": [\r\n            \"database\"\r\n        ],\r\n        \"psr-4\": {\r\n            \"App\\\\\": \"app\/\"\r\n        }\r\n    },\r\n    \"autoload-dev\": {\r\n        \"classmap\": [\r\n            \"tests\/TestCase.php\"\r\n        ]\r\n    },\r\n    \"scripts\": {\r\n        \"post-root-package-install\": [\r\n            \"php -r \\\"copy('.env.example', '.env');\\\"\"\r\n        ],\r\n        \"post-create-project-cmd\": [\r\n            \"php artisan key:generate\"\r\n        ],\r\n        \"post-install-cmd\": [\r\n            \"php artisan clear-compiled\",\r\n            \"php artisan optimize\"\r\n        ],\r\n        \"pre-update-cmd\": [\r\n            \"php artisan clear-compiled\"\r\n        ],\r\n        \"post-update-cmd\": [\r\n            \"php artisan optimize\"\r\n        ]\r\n    },\r\n    \"config\": {\r\n        \"preferred-install\": \"dist\"\r\n    },\r\n    \"repositories\": {\r\n        \"packagist\": {\r\n            \"type\": \"composer\",\r\n            \"url\": \"https:\/\/packagist.phpcomposer.com\"\r\n        }\r\n    }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>OK\uff0c\u4e00\u5207\u641e\u5b9a\uff01\u8bd5\u4e00\u4e0b <code>composer install<\/code> \u6765\u4f53\u9a8c\u98de\u4e00\u822c\u7684\u901f\u5ea6\u5427\uff01<\/p>\n<p>\u539f\u6587\u94fe\u63a5:http:\/\/pkg.phpcomposer.com\/<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9519\u8bef: Your configuration does not allow connection tohttp [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[115],"tags":[116,117,118],"class_list":["post-245","post","type-post","status-publish","format-standard","hentry","category-composer","tag-composer","tag-configuration-does","tag-connection-to","clear"],"_links":{"self":[{"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/posts\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":8,"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"predecessor-version":[{"id":254,"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions\/254"}],"wp:attachment":[{"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.shenmdyw.com\/index.php\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}