{"action":"created","issue":{"url":"https://api.github.com/repos/npm/how-to-npm/issues/25","labels_url":"https://api.github.com/repos/npm/how-to-npm/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/npm/how-to-npm/issues/25/comments","events_url":"https://api.github.com/repos/npm/how-to-npm/issues/25/events","html_url":"https://github.com/npm/how-to-npm/issues/25","id":87275929,"number":25,"title":"npm publish has resulted in error \"You need to authorize this machine using `npm adduser`\"","user":{"login":"alabebop","id":1131109,"avatar_url":"https://avatars.githubusercontent.com/u/1131109?v=3","gravatar_id":"","url":"https://api.github.com/users/alabebop","html_url":"https://github.com/alabebop","followers_url":"https://api.github.com/users/alabebop/followers","following_url":"https://api.github.com/users/alabebop/following{/other_user}","gists_url":"https://api.github.com/users/alabebop/gists{/gist_id}","starred_url":"https://api.github.com/users/alabebop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alabebop/subscriptions","organizations_url":"https://api.github.com/users/alabebop/orgs","repos_url":"https://api.github.com/users/alabebop/repos","events_url":"https://api.github.com/users/alabebop/events{/privacy}","received_events_url":"https://api.github.com/users/alabebop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-11T09:25:19Z","updated_at":"2015-07-21T04:40:58Z","closed_at":null,"body":"Hi, \r\n\r\nIn the **08 Publish** chapter I was not able to `npm publish` against the .npmrc local environment. However it worked when the .npmrc file removed and with a connection to https://www.npmjs.com/. None of the following chapters worked correctly either against this local environment, and all worked well again without the .npmrc file and with a connection to https://www.npmjs.com/.\r\n\r\nI once went through the **02 Login** chapter smoothly and `npm whoami` returned the correct info. At this point running `npm whoami` also results in authentication errors.\r\n\r\nLooking at the path that `userconfig` in .npmrc pointed to (`userconfig = /Users/xiaoli.shen/.config/how-to-npm/npmrc`), there is no such file or folder named `npmrc`, which might be the reason for the authentication errors.\r\n\r\n\r\n\r\nI'm using version 2.0.0 of how-to-npm and on Mac OS 10.9.5 \r\n\r\nMy npm-debug.log is as follows:\r\n\r\n```\r\n0 info it worked if it ends with ok\r\n1 verbose cli [ 'node', '/usr/local/bin/npm', 'adduser' ]\r\n2 info using npm@2.11.1\r\n3 info using node@v0.12.4\r\n4 verbose adduser before first PUT { _id: 'org.couchdb.user:alabebop',\r\n4 verbose adduser   name: 'alabebop',\r\n4 verbose adduser   password: 'XXXXX',\r\n4 verbose adduser   email: 'alabebop@gmail.com',\r\n4 verbose adduser   type: 'user',\r\n4 verbose adduser   roles: [],\r\n4 verbose adduser   date: '2015-06-11T09:07:53.405Z' }\r\n5 verbose request uri http://localhost:15443/-/user/org.couchdb.user:alabebop\r\n6 verbose request new user, so can't send auth\r\n7 info attempt registry request try #1 at 11:07:53\r\n8 verbose request id 8f19ff7f3662cb4c\r\n9 http request PUT http://localhost:15443/-/user/org.couchdb.user:alabebop\r\n10 info retry will retry, error on last attempt: Error: connect ECONNREFUSED\r\n11 info attempt registry request try #2 at 11:08:03\r\n12 http request PUT http://localhost:15443/-/user/org.couchdb.user:alabebop\r\n13 info retry will retry, error on last attempt: Error: connect ECONNREFUSED\r\n14 info attempt registry request try #3 at 11:09:03\r\n15 http request PUT http://localhost:15443/-/user/org.couchdb.user:alabebop\r\n16 verbose request invalidating /Users/xiaoli.shen/.npm/localhost_15443/-/user/org.couchdb.user_3Aalabebop on PUT\r\n17 verbose adduser back [ { [Error: connect ECONNREFUSED]\r\n17 verbose adduser     code: 'ECONNREFUSED',\r\n17 verbose adduser     errno: 'ECONNREFUSED',\r\n17 verbose adduser     syscall: 'connect' },\r\n17 verbose adduser   undefined,\r\n17 verbose adduser   undefined ]\r\n18 verbose stack Error: connect ECONNREFUSED\r\n18 verbose stack     at exports._errnoException (util.js:746:11)\r\n18 verbose stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)\r\n19 verbose cwd /Users/xiaoli.shen/projects/nodeschool/how-to-npm\r\n20 error Darwin 13.4.0\r\n21 error argv \"node\" \"/usr/local/bin/npm\" \"adduser\"\r\n22 error node v0.12.4\r\n23 error npm  v2.11.1\r\n24 error code ECONNREFUSED\r\n25 error errno ECONNREFUSED\r\n26 error syscall connect\r\n27 error Error: connect ECONNREFUSED\r\n27 error     at exports._errnoException (util.js:746:11)\r\n27 error     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)\r\n27 error  { [Error: connect ECONNREFUSED]\r\n27 error   code: 'ECONNREFUSED',\r\n27 error   errno: 'ECONNREFUSED',\r\n27 error   syscall: 'connect' }\r\n28 error If you are behind a proxy, please make sure that the\r\n28 error 'proxy' config is set properly.  See: 'npm help config'\r\n29 verbose exit [ 1, true ]\r\n```"},"comment":{"url":"https://api.github.com/repos/npm/how-to-npm/issues/comments/123155491","html_url":"https://github.com/npm/how-to-npm/issues/25#issuecomment-123155491","issue_url":"https://api.github.com/repos/npm/how-to-npm/issues/25","id":123155491,"user":{"login":"smirciat","id":9876261,"avatar_url":"https://avatars.githubusercontent.com/u/9876261?v=3","gravatar_id":"","url":"https://api.github.com/users/smirciat","html_url":"https://github.com/smirciat","followers_url":"https://api.github.com/users/smirciat/followers","following_url":"https://api.github.com/users/smirciat/following{/other_user}","gists_url":"https://api.github.com/users/smirciat/gists{/gist_id}","starred_url":"https://api.github.com/users/smirciat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smirciat/subscriptions","organizations_url":"https://api.github.com/users/smirciat/orgs","repos_url":"https://api.github.com/users/smirciat/repos","events_url":"https://api.github.com/users/smirciat/events{/privacy}","received_events_url":"https://api.github.com/users/smirciat/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T04:40:58Z","updated_at":"2015-07-21T04:40:58Z","body":"Same issue here.  It sounds like @alabebop has a workaround, but I am too new to this environment to understand it.  Is any further guidance available?"}}