{"id":2097,"date":"2022-08-30T15:22:01","date_gmt":"2022-08-30T15:22:01","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/26\/npm-behind-ntlm-proxy-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:22:01","modified_gmt":"2022-08-30T15:22:01","slug":"npm-behind-ntlm-proxy-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/npm-behind-ntlm-proxy-collection-of-common-programming-errors\/","title":{"rendered":"NPM behind NTLM proxy-Collection of common programming errors"},"content":{"rendered":"<p>I solved it this way (OS: Windows XP SP3):<\/p>\n<p><strong>1.<\/strong> Download CNTLM installer and run it.<\/p>\n<p><strong>2.<\/strong> Find and fill in these fields in cntlm.ini. <em>Do not fill in the <code>Password<\/code> field, it&#8217;s never a good idea to store unencrypted passwords in text files.<\/em><\/p>\n<pre><code>Username    YOUR_USERNAME\nDomain      YOUR_DOMAIN\nProxy       YOUR_PROXY_IP:PORT\nListen      53128\n<\/code><\/pre>\n<p><strong>3.<\/strong> Open console, and type these commands to generate password hashes.<\/p>\n<pre><code>&gt; cd c:\\the_install_directory_of_cntlm\n&gt; cntlm -H\nPassword: ...type proxy password here...\nPassLM          D6888AC8AE0EEE294D954420463215AE\nPassNT          0E1FAED265D32EBBFB15F410D27994B2\nPassNTLMv2      91E810C86B3FD1BD14342F945ED42CD6\n<\/code><\/pre>\n<p><strong>4.<\/strong> Copy the above three lines into cntlm.ini, under the <code>Domain<\/code> field&#8217;s line. <em>Once more, do not fill in the <code>Password<\/code> field.<\/em> Save cntlm.ini.<\/p>\n<p><strong>5.<\/strong> Open the Service Manager (from command line: services.msc), and start the service called &#8220;CNTLM Authentication Proxy&#8221;.<\/p>\n<p><strong>6.<\/strong> In the console, type these lines:<\/p>\n<pre><code>&gt; npm config set proxy http:\/\/localhost:53128\n&gt; npm config set https-proxy https:\/\/localhost:53128\n&gt; npm config set registry \"http:\/\/registry.npmjs.org\/\"\n<\/code><\/pre>\n<p><strong>7.<\/strong> Now <code>npm view<\/code>, <code>npm install<\/code> etc. should work. Example:<\/p>\n<pre><code>&gt; npm view qunit\n...nice answer, no errors :)\n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-12-26 03:13:55. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I solved it this way (OS: Windows XP SP3): 1. Download CNTLM installer and run it. 2. Find and fill in these fields in cntlm.ini. Do not fill in the Password field, it&#8217;s never a good idea to store unencrypted passwords in text files. Username YOUR_USERNAME Domain YOUR_DOMAIN Proxy YOUR_PROXY_IP:PORT Listen 53128 3. Open console, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2097","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2097"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2097\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}