{"action":"opened","issue":{"url":"https://api.github.com/repos/rlidwka/sinopia/issues/190","labels_url":"https://api.github.com/repos/rlidwka/sinopia/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/rlidwka/sinopia/issues/190/comments","events_url":"https://api.github.com/repos/rlidwka/sinopia/issues/190/events","html_url":"https://github.com/rlidwka/sinopia/issues/190","id":54736403,"number":190,"title":"Cannot use proxy to download package via http://registry.npmjs.org/","user":{"login":"rellaguo","id":8747576,"avatar_url":"https://avatars.githubusercontent.com/u/8747576?v=3","gravatar_id":"","url":"https://api.github.com/users/rellaguo","html_url":"https://github.com/rellaguo","followers_url":"https://api.github.com/users/rellaguo/followers","following_url":"https://api.github.com/users/rellaguo/following{/other_user}","gists_url":"https://api.github.com/users/rellaguo/gists{/gist_id}","starred_url":"https://api.github.com/users/rellaguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rellaguo/subscriptions","organizations_url":"https://api.github.com/users/rellaguo/orgs","repos_url":"https://api.github.com/users/rellaguo/repos","events_url":"https://api.github.com/users/rellaguo/events{/privacy}","received_events_url":"https://api.github.com/users/rellaguo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-19T08:13:39Z","updated_at":"2015-01-19T08:13:39Z","closed_at":null,"body":"Sinopia: 1.0.0-beta.2\r\nnpm: 1.4.21\r\n \r\nI use sinopia for a private repo hosted on my company server  and I need to pass through a proxy to reach http://registry.npmjs.org/. I set proxy in /home/rellaguo/.config/sinopia/config.yaml\r\n-----------------------------------------------------------------------------\r\n# proxy\r\nhttp_proxy: http://web-proxy.at.com:8080\r\nhttps_proxy: http://web-proxy.at.com:8080\r\nno_proxy: localhost,127.0.0.1\r\n-----------------------------------------------------------------------------\r\nThen I run command: npm install diskdb, I get error message:\r\n$ npm install diskdb\r\nnpm ERR! registry error parsing json\r\nnpm ERR! registry error parsing json\r\nnpm ERR! registry error parsing json\r\nnpm ERR! SyntaxError: Unexpected token <\r\nnpm ERR! <HTML><HEAD>\r\nnpm ERR! <TITLE>Network Error</TITLE>\r\nnpm ERR! </HEAD>\r\nnpm ERR! <BODY>\r\nnpm ERR! <FONT face=\"Helvetica\">\r\nnpm ERR! <big><strong></strong></big><BR>\r\nnpm ERR! </FONT>\r\nnpm ERR! <blockquote>\r\nnpm ERR! <TABLE border=0 cellPadding=1 width=\"80%\">\r\nnpm ERR! <TR><TD>\r\nnpm ERR! <FONT face=\"Helvetica\">\r\nnpm ERR! <big>Network Error (tcp_error)</big>\r\nnpm ERR! <BR>\r\nnpm ERR! <BR>\r\nnpm ERR! </FONT>\r\nnpm ERR! </TD></TR>\r\nnpm ERR! <TR><TD>\r\nnpm ERR! <FONT face=\"Helvetica\">\r\nnpm ERR! A communication error occurred: \"Operation timed out\"\r\nnpm ERR! </FONT>\r\nnpm ERR! </TD></TR>\r\nnpm ERR! <TR><TD>\r\nnpm ERR! <FONT face=\"Helvetica\">\r\nnpm ERR! The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.\r\nnpm ERR! </FONT>\r\nnpm ERR! </TD></TR>\r\nnpm ERR! <TR><TD>\r\nnpm ERR! <FONT face=\"Helvetica\" SIZE=2>\r\nnpm ERR! <BR>\r\nnpm ERR! For assistance, contact your network support team.\r\nnpm ERR! </FONT>\r\nnpm ERR! </TD></TR>\r\nnpm ERR! </TABLE>\r\nnpm ERR! </blockquote>\r\nnpm ERR! </FONT>\r\nnpm ERR! </BODY></HTML>\r\nnpm ERR! \r\nnpm ERR!     at Object.parse (native)\r\nnpm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:266:23)\r\nnpm ERR!     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:238:65)\r\nnpm ERR!     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:123:22)\r\nnpm ERR!     at Request.emit (events.js:98:17)\r\nnpm ERR!     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:893:14)\r\nnpm ERR!     at Request.emit (events.js:117:20)\r\nnpm ERR!     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:844:12)\r\nnpm ERR!     at IncomingMessage.emit (events.js:117:20)\r\nnpm ERR!     at _stream_readable.js:938:16\r\nnpm ERR! If you need help, you may report this *entire* log,\r\nnpm ERR! including the npm and node versions, at:\r\nnpm ERR!     <http://github.com/npm/npm/issues>\r\n\r\nnpm ERR! System Linux 2.6.32-71.el6.x86_64\r\nnpm ERR! command \"/usr/local/bin/node\" \"/usr/local/bin/npm\" \"install\" \"kappa\"\r\nnpm ERR! cwd /home/rellaguo\r\nnpm ERR! node -v v0.10.30\r\nnpm ERR! npm -v 1.4.21\r\nnpm ERR! type unexpected_token\r\nnpm ERR! \r\nnpm ERR! Additional logging details can be found in:\r\nnpm ERR!     /home/rellaguo/npm-debug.log\r\nnpm ERR! not ok code 0\r\n\r\n\r\nThen I run command: npm install diskdb -proxy http://web-proxy.at.com:8080 --https-proxy http://web-proxy.at.com:8080, I get error message too:\r\n$ npm install diskdb -proxy http://web-proxy.at.com:8080 --https-proxy http://web-proxy.at.com:8080\r\nnpm ERR! registry error parsing json\r\nnpm ERR! registry error parsing json\r\nnpm ERR! registry error parsing json\r\nnpm ERR! SyntaxError: Unexpected token <\r\nnpm ERR! <HTML><HEAD>\r\nnpm ERR! <TITLE>Network Error</TITLE>\r\nnpm ERR! </HEAD>\r\nnpm ERR! <BODY>\r\nnpm ERR! <FONT face=\"Helvetica\">\r\nnpm ERR! <big><strong></strong></big><BR>\r\nnpm ERR! </FONT>\r\nnpm ERR! <blockquote>\r\nnpm ERR! <TABLE border=0 cellPadding=1 width=\"80%\">\r\nnpm ERR! <TR><TD>\r\nnpm ERR! <FONT face=\"Helvetica\">\r\nnpm ERR! <big>Network Error (tcp_error)</big>\r\nnpm ERR! <BR>\r\nnpm ERR! <BR>\r\nnpm ERR! </FONT>\r\nnpm ERR! </TD></TR>\r\nnpm ERR! <TR><TD>\r\nnpm ERR! <FONT face=\"Helvetica\">\r\nnpm ERR! A communication error occurred: \"Operation timed out\"\r\nnpm ERR! </FONT>\r\nnpm ERR! </TD></TR>\r\nnpm ERR! <TR><TD>\r\nnpm ERR! <FONT face=\"Helvetica\">\r\nnpm ERR! The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.\r\nnpm ERR! </FONT>\r\nnpm ERR! </TD></TR>\r\nnpm ERR! <TR><TD>\r\nnpm ERR! <FONT face=\"Helvetica\" SIZE=2>\r\nnpm ERR! <BR>\r\nnpm ERR! For assistance, contact your network support team.\r\nnpm ERR! </FONT>\r\nnpm ERR! </TD></TR>\r\nnpm ERR! </TABLE>\r\nnpm ERR! </blockquote>\r\nnpm ERR! </FONT>\r\nnpm ERR! </BODY></HTML>\r\nnpm ERR! \r\nnpm ERR!     at Object.parse (native)\r\nnpm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:266:23)\r\nnpm ERR!     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:238:65)\r\nnpm ERR!     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:123:22)\r\nnpm ERR!     at Request.emit (events.js:98:17)\r\nnpm ERR!     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:893:14)\r\nnpm ERR!     at Request.emit (events.js:117:20)\r\nnpm ERR!     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:844:12)\r\nnpm ERR!     at IncomingMessage.emit (events.js:117:20)\r\nnpm ERR!     at _stream_readable.js:938:16\r\nnpm ERR! If you need help, you may report this *entire* log,\r\nnpm ERR! including the npm and node versions, at:\r\nnpm ERR!     <http://github.com/npm/npm/issues>\r\n\r\nnpm ERR! System Linux 2.6.32-71.el6.x86_64\r\nnpm ERR! command \"/usr/local/bin/node\" \"/usr/local/bin/npm\" \"install\" \"diskdb\" \"-proxy\" \"http://web-proxy.at.com:8080\" \"--https-proxy\" \"http://web-proxy.at.com:8080\"\r\nnpm ERR! cwd /home/rellaguo\r\nnpm ERR! node -v v0.10.30\r\nnpm ERR! npm -v 1.4.21\r\nnpm ERR! type unexpected_token\r\nnpm ERR! \r\nnpm ERR! Additional logging details can be found in:\r\nnpm ERR!     /home/rellaguo/npm-debug.log\r\nnpm ERR! not ok code 0\r\n\r\nMy npm configl list:\r\n$npm config ls -l\r\n; cli configs\r\nlong = true\r\nregistry = \"http://localhost:4873/\"\r\nuser-agent = \"npm/1.4.21 node/v0.10.30 linux x64\"\r\n\r\n; userconfig /home/agilairedev/.npmrc\r\nhttps-proxy = \"http://web-proxy.cce.hp.com:8080/\"\r\nproxy = \"http://web-proxy.cce.hp.com:8080/\"\r\nregistry = \"http://localhost:4873/\"\r\n\r\n; default values\r\nalways-auth = false\r\nbin-links = true\r\nbrowser = null\r\nca = null\r\ncache = \"/home/agilairedev/.npm\"\r\ncache-lock-retries = 10\r\ncache-lock-stale = 60000\r\ncache-lock-wait = 10000\r\ncache-max = null\r\ncache-min = 10\r\ncafile = undefined\r\ncert = null\r\ncolor = true\r\ndepth = null\r\ndescription = true\r\ndev = false\r\neditor = \"vi\"\r\nemail = \"\"\r\nengine-strict = false\r\nfetch-retries = 2\r\nfetch-retry-factor = 10\r\nfetch-retry-maxtimeout = 60000\r\nfetch-retry-mintimeout = 10000\r\nforce = false\r\ngit = \"git\"\r\ngit-tag-version = true\r\nglobal = false\r\nglobalconfig = \"/usr/local/etc/npmrc\"\r\nglobalignorefile = \"/usr/local/etc/npmignore\"\r\ngroup = 500\r\nheading = \"npm\"\r\nhttps-proxy = \"http://web-proxy.cce.hp.com:8080/\"\r\nignore-scripts = false\r\ninit-module = \"/home/agilairedev/.npm-init.js\"\r\ninit.author.email = \"\"\r\ninit.author.name = \"\"\r\ninit.author.url = \"\"\r\ninit.license = \"ISC\"\r\njson = false\r\nkey = null\r\nlink = false\r\nlocal-address = undefined\r\nloglevel = \"warn\"\r\n; long = false (overridden)\r\nmessage = \"%s\"\r\nnode-version = \"0.10.30\"\r\nnpat = false\r\nonload-script = null\r\noptional = true\r\nparseable = false\r\nprefix = \"/usr/local\"\r\nproduction = false\r\nproprietary-attribs = true\r\nproxy = \"http://web-proxy.cce.hp.com:8080/\"\r\nrebuild-bundle = true\r\n; registry = \"https://registry.npmjs.org/\" (overridden)\r\nrollback = true\r\nsave = false\r\nsave-bundle = false\r\nsave-dev = false\r\nsave-exact = false\r\nsave-optional = false\r\nsave-prefix = \"^\"\r\nsearchexclude = null\r\nsearchopts = \"\"\r\nsearchsort = \"name\"\r\nshell = \"/bin/bash\"\r\nshrinkwrap = true\r\nsign-git-tag = false\r\nspin = true\r\nstrict-ssl = true\r\ntag = \"latest\"\r\ntmp = \"/tmp\"\r\numask = 2\r\nunicode = true\r\nunsafe-perm = true\r\nusage = false\r\nuser = 0\r\n; user-agent = \"npm/{npm-version} node/{node-version} {platform} {arch}\" (overridden)\r\nuserconfig = \"/home/agilairedev/.npmrc\"\r\nusername = \"\"\r\nversion = false\r\nversions = false\r\nviewer = \"man\"\r\n\r\nMy configuration file:\r\n#\r\n# This is the default config file. It allows all users to do anything,\r\n# so don't use it on production systems.\r\n#\r\n# Look here for more config file examples:\r\n# https://github.com/rlidwka/sinopia/tree/master/conf\r\n#\r\n\r\n# path to a directory with all packages\r\nstorage: /home/agilairedev/.local/share/sinopia/storage\r\n\r\nusers:\r\n  admin:\r\n  # crypto.createHash('sha1').update(pass).digest('hex')\r\n    password: 613a5389aee3a26c462de0172bbb154c6ebeb34a\r\n\r\nauth:\r\n  htpasswd:\r\n    file: ./htpasswd\r\n    # Maximum amount of users allowed to register, defaults to \"+inf\".\r\n    # You can set this to -1 to disable registration.\r\n    #max_users: 1000\r\n\r\n# a list of other known repositories we can talk to\r\nuplinks:\r\n  npmjs:\r\n    url: http://registry.npmjs.org/\r\n\r\npackages:\r\n  '@*/*':\r\n    # scoped packages\r\n    allow_access: $all\r\n    allow_publish: $authenticated\r\n\r\n  '*':\r\n    # allow all users (including non-authenticated users) to read and\r\n    # publish all packages\r\n    #\r\n    # you can specify usernames/groupnames (depending on your auth plugin)\r\n    # and three keywords: \"$all\", \"$anonymous\", \"$authenticated\"\r\n    allow_access: $all\r\n\r\n    # allow all known users to publish packages\r\n    # (anyone can register by default, remember?)\r\n    allow_publish: $authenticated\r\n\r\n    # if package is not available locally, proxy requests to 'npmjs' registry\r\n    proxy: npmjs\r\n\r\n# log settings\r\nlogs:\r\n  - {type: stdout, format: pretty, level: http}\r\n  #- {type: file, path: sinopia.log, level: info}\r\n# proxy\r\nhttp_proxy: http://web-proxy.at.com:8080\r\nhttps_proxy: http://web-proxy.at.com:8080\r\nno_proxy: localhost,127.0.0.1\r\n"}}