{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/7503","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/7503/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/7503/comments","events_url":"https://api.github.com/repos/composer/composer/issues/7503/events","html_url":"https://github.com/composer/composer/issues/7503","id":346039460,"node_id":"MDU6SXNzdWUzNDYwMzk0NjA=","number":7503,"title":"  The \"https://packagist.org/packages.json\" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.","user":{"login":"threeFatCat","id":11312281,"node_id":"MDQ6VXNlcjExMzEyMjgx","avatar_url":"https://avatars2.githubusercontent.com/u/11312281?v=4","gravatar_id":"","url":"https://api.github.com/users/threeFatCat","html_url":"https://github.com/threeFatCat","followers_url":"https://api.github.com/users/threeFatCat/followers","following_url":"https://api.github.com/users/threeFatCat/following{/other_user}","gists_url":"https://api.github.com/users/threeFatCat/gists{/gist_id}","starred_url":"https://api.github.com/users/threeFatCat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threeFatCat/subscriptions","organizations_url":"https://api.github.com/users/threeFatCat/orgs","repos_url":"https://api.github.com/users/threeFatCat/repos","events_url":"https://api.github.com/users/threeFatCat/events{/privacy}","received_events_url":"https://api.github.com/users/threeFatCat/received_events","type":"User","site_admin":false},"labels":[{"id":66814887,"node_id":"MDU6TGFiZWw2NjgxNDg4Nw==","url":"https://api.github.com/repos/composer/composer/labels/Support","name":"Support","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-31T05:22:40Z","updated_at":"2018-08-01T02:33:15Z","closed_at":null,"author_association":"NONE","body":"My `composer.json`:\r\n\r\n```json\r\n{\r\n    \"name\": \"ricadiz/composer\",\r\n    \"require\": {}\r\n}\r\n\r\n```\r\n\r\nOutput of `composer diagnose`:\r\n\r\n```\r\nChecking platform settings: OK\r\nChecking git settings: OK\r\nChecking http connectivity to packagist: WARNING\r\n[Composer\\Downloader\\TransportException] The \"http://packagist.org/packages.json\" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.\r\n\r\nChecking https connectivity to packagist: WARNING\r\n[Composer\\Downloader\\TransportException] The \"https://packagist.org/packages.json\" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.\r\n\r\nChecking github.com rate limit: OK\r\nChecking disk free space: OK\r\nChecking pubkeys:\r\nTags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642\r\nDev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952\r\nOK\r\nChecking composer version: OK\r\nComposer version: 1.6.5\r\nPHP version: 7.2.7\r\nPHP binary path: D:\\xampp7\\php\\php.exe\r\n\r\n```\r\n\r\nWhen I run this command:\r\n\r\n```\r\ncomposer create-project --prefer-dist laravel/laravel testapp\r\n```\r\n\r\nI get the following output:\r\n\r\n```\r\n  [Composer\\Downloader\\TransportException]                                      \r\n  The \"https://packagist.org/packages.json\" file could not be downloaded: failed to open stream: No connection could\r\n  be made because the target machine actively refused it.         \r\n```\r\n\r\nBasically I was trying to setup composer in a corporate environment to enable to work with Laravel projects. I freshly installed latest XAMPP. But I have already spent days looking for solution on how to make composer work. I have already tried the following:\r\n\r\n* Disable IPv6 wireless connection (Since I'm currently using laptop)\r\n* Set/Remove environment variables (tried http_proxy alone, http_proxy, https_proxy, HTTP_PROXY, HTTP_PROXY, all four of them) but still would fail somehow\r\n* Did restart every set of env variables\r\n* Removed all the environment proxy variable and manually doing ```export HTTP_PROXY=....``` and ```export HTTPS_PROXY=...``` \r\n* Yes, I use credentials in my proxy ```username:password@host:port```\r\n\r\n**Additional notes:**\r\n* I used the windows installer to install composer, and I noticed that the installer doesn't accept leading ```http://``` or ```https://``` in the proxy field during installation. Which I also spent days troubleshooting how to install composer. I'm not using VM for now.\r\n* I installed latest `cURL` and tried the following command:\r\n``` curl https://packagist.org/package.json -vv```\r\nAnd somehow got the json from the respose:\r\n```\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100  1456  100  1456    0     0   3586      0 --:--:-- --:--:-- --:--:--  3586{\"packages\":[],\"notify\":\"https://packagist.org/downloads/%package%\",\"notify-batch\":\"https://packagist.org/downloads/\",\"providers-url\":\"/p/%package%$%hash%.json\",\"search\":\"https://packagist.org/search.json?q=%query%&type=%type%\",\"provider-includes\":{\"p/provider-2013$%hash%.json\":{\"sha256\":\"99bae025d4d2e751a27fe35e136f601de188eda7077be4d5f63a549ea97907db\"},\"p/provider-2014$%hash%.json\":{\"sha256\":\"9406108133abe969d70795f837a3a9f72b416d25ca63944d1fc43355fde3cacf\"},\"p/provider-2015$%hash%.json\":{\"sha256\":\"9e6c81496931a07012024abf1cf1c114e8b86188f643d9a6f5481dbda26d02cd\"},\"p/provider-2016$%hash%.json\":{\"sha256\":\"7a798e4cb4e4191c3932f06c5d6cf099b1397df3d8eee73f61f73ca8f6dbe917\"},\"p/provider-2017$%hash%.json\":{\"sha256\":\"31a86e95e9ba4cae26868d352250c93c2c20f8ff6f454cf7086ba066c1877e3c\"},\"p/provider-2017-10$%hash%.json\":{\"sha256\":\"b2da560198469600563d4428b4c7c769601802154d16b224cb559404567cad72\"},\"p/provider-2018-01$%hash%.json\":{\"sha256\":\"b1959d2e442d85a41d6c5fda0dca0946a342f2da07df60eae618a2ed19421a0d\"},\"p/provider-2018-04$%hash%.json\":{\"sha256\":\"4b39c9ca91e2bba7265b8b1f85bdb8dc522a5c8df00b322adfb43ac3c1d5c4a2\"},\"p/provider-2018-07$%hash%.json\":{\"sha256\":\"93936039e8fd151b21c68a396a7a1217e2d725803a2b54b0e1cad961c76aabfc\"},\"p/provider-archived$%hash%.json\":{\"sha256\":\"939a942590ec7e93239cd4beb63399da3206d5337563e0ac345a5b58f458b46e\"},\"p/provider-latest$%hash%.json\":{\"sha256\":\"793c519d05e378606154e744a199e151f88adb32f526294cd15c78895af3a3a8\"}}}\r\n```\r\n* We're using a domain user account so basically my proxy authentication looks like this:\r\n```domain/username:password```\r\n* I can access the url using a web browser\r\n* I got certificate errors for ```https://getcomposer.org``` also along the way but I already managed to fix it  by importing the necessary intermediate ca. \r\n* I tried to check run this command ``` openssl s_client -connect packagist.org:443``` and got this response:\r\n```\r\nconnect: No error\r\nconnect:errno=0\r\n```\r\n\r\nI would like to be much in detail but I don't want this post to get long. Thanks."},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/409429466","html_url":"https://github.com/composer/composer/issues/7503#issuecomment-409429466","issue_url":"https://api.github.com/repos/composer/composer/issues/7503","id":409429466,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTQyOTQ2Ng==","user":{"login":"threeFatCat","id":11312281,"node_id":"MDQ6VXNlcjExMzEyMjgx","avatar_url":"https://avatars2.githubusercontent.com/u/11312281?v=4","gravatar_id":"","url":"https://api.github.com/users/threeFatCat","html_url":"https://github.com/threeFatCat","followers_url":"https://api.github.com/users/threeFatCat/followers","following_url":"https://api.github.com/users/threeFatCat/following{/other_user}","gists_url":"https://api.github.com/users/threeFatCat/gists{/gist_id}","starred_url":"https://api.github.com/users/threeFatCat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threeFatCat/subscriptions","organizations_url":"https://api.github.com/users/threeFatCat/orgs","repos_url":"https://api.github.com/users/threeFatCat/repos","events_url":"https://api.github.com/users/threeFatCat/events{/privacy}","received_events_url":"https://api.github.com/users/threeFatCat/received_events","type":"User","site_admin":false},"created_at":"2018-08-01T02:33:15Z","updated_at":"2018-08-01T02:33:15Z","author_association":"NONE","body":"@alcohol not sure yet what to tell the network admin since I can just access through ```cURL``` and web browser. I think I'll just try to figure out first which part composer can't access ```https://packagist.org```. \r\n\r\nI also wonder why during ```composer diagnose``` it was able to access ```https://api.github.com/..``` for checking rate limit but it can't for ```https://packagist.org``` and can access ```https://getcomposer.org/versions``` for ```Checking composer version```"}}
{"actor":{"display_login":"threeFatCat"}}