{"id":29,"date":"2018-09-06T13:36:25","date_gmt":"2018-09-06T13:36:25","guid":{"rendered":"https:\/\/purepcs.co.uk\/kb\/?p=29"},"modified":"2018-09-06T13:36:25","modified_gmt":"2018-09-06T13:36:25","slug":"npm-proxy-settings","status":"publish","type":"post","link":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/","title":{"rendered":"NPM proxy settings"},"content":{"rendered":"<p>Using the command line to set NPM proxy variables.\u00a0 You can set each command globally by adding a -g at the end of the line.<\/p>\n<p>Set the http proxy &#8211; Rememebr to replace the http:\/\/proxy.url:8080 with your specific values.<\/p>\n<pre>npm config set proxy http:\/\/proxy.url:8080<\/pre>\n<p>Set the https proxy &#8211; Rememebr to replace the URL and port number with your specific values.<\/p>\n<pre>npm config set https-proxy http:\/\/proxy.url:8080<\/pre>\n<p>Most proxies use SSL interception and replace the hosts SSL certificate with one of their own, you can have the URLs required added to any SSL Bypass policy by your proxy server admin, import your proxy servers CA into your NPM setup or tell NPM to ignore errors with SSL certificates<\/p>\n<p>In this example we&#8217;re simply telling NPM to ignore the errors, this is less secure importing your proxy certificate but a quicker way of working.<\/p>\n<pre>npm config set strict-ssl false<\/pre>\n<p>Global example:<\/p>\n<pre>npm config set proxy http:\/\/proxy.url:8080 -g<\/pre>\n<p>&nbsp;<\/p>\n<p>There are further settings which may need to be added that <em>might<\/em> be discussed in a future post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using the command line to set NPM proxy variables.\u00a0 You can set each command globally by adding a -g at the end of the line.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,15],"tags":[17,16,18,19],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-command-line-cli","category-npm-node","tag-nodejs","tag-npm","tag-proxy","tag-ssl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>NPM proxy settings - Pure PC&#039;s<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NPM proxy settings - Pure PC&#039;s\" \/>\n<meta property=\"og:description\" content=\"Using the command line to set NPM proxy variables.\u00a0 You can set each command globally by adding a -g at the end of the line.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/\" \/>\n<meta property=\"og:site_name\" content=\"Pure PC&#039;s\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-06T13:36:25+00:00\" \/>\n<meta name=\"author\" content=\"purepcs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"purepcs\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/\"},\"author\":{\"name\":\"purepcs\",\"@id\":\"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/d93eda5f74d1012b66a00b4518a0b089\"},\"headline\":\"NPM proxy settings\",\"datePublished\":\"2018-09-06T13:36:25+00:00\",\"dateModified\":\"2018-09-06T13:36:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/\"},\"wordCount\":158,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/d93eda5f74d1012b66a00b4518a0b089\"},\"keywords\":[\"nodejs\",\"npm\",\"proxy\",\"ssl\"],\"articleSection\":[\"Command Line (CLi)\",\"NPM \/ Node\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/\",\"url\":\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/\",\"name\":\"NPM proxy settings - Pure PC&#039;s\",\"isPartOf\":{\"@id\":\"https:\/\/purepcs.co.uk\/kb\/#website\"},\"datePublished\":\"2018-09-06T13:36:25+00:00\",\"dateModified\":\"2018-09-06T13:36:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/purepcs.co.uk\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NPM proxy settings\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/purepcs.co.uk\/kb\/#website\",\"url\":\"https:\/\/purepcs.co.uk\/kb\/\",\"name\":\"Pure PC&#039;s\",\"description\":\"Ramblings, Knowledge and Musings\",\"publisher\":{\"@id\":\"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/d93eda5f74d1012b66a00b4518a0b089\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/purepcs.co.uk\/kb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/d93eda5f74d1012b66a00b4518a0b089\",\"name\":\"purepcs\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/05a7ed7212adca9fab9199df1a61e3092c4eaf22b6e66ab39599144a212ea6f2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/05a7ed7212adca9fab9199df1a61e3092c4eaf22b6e66ab39599144a212ea6f2?s=96&d=mm&r=g\",\"caption\":\"purepcs\"},\"logo\":{\"@id\":\"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"NPM proxy settings - Pure PC&#039;s","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/","og_locale":"en_GB","og_type":"article","og_title":"NPM proxy settings - Pure PC&#039;s","og_description":"Using the command line to set NPM proxy variables.\u00a0 You can set each command globally by adding a -g at the end of the line.","og_url":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/","og_site_name":"Pure PC&#039;s","article_published_time":"2018-09-06T13:36:25+00:00","author":"purepcs","twitter_card":"summary_large_image","twitter_misc":{"Written by":"purepcs","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/#article","isPartOf":{"@id":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/"},"author":{"name":"purepcs","@id":"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/d93eda5f74d1012b66a00b4518a0b089"},"headline":"NPM proxy settings","datePublished":"2018-09-06T13:36:25+00:00","dateModified":"2018-09-06T13:36:25+00:00","mainEntityOfPage":{"@id":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/"},"wordCount":158,"commentCount":0,"publisher":{"@id":"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/d93eda5f74d1012b66a00b4518a0b089"},"keywords":["nodejs","npm","proxy","ssl"],"articleSection":["Command Line (CLi)","NPM \/ Node"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/","url":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/","name":"NPM proxy settings - Pure PC&#039;s","isPartOf":{"@id":"https:\/\/purepcs.co.uk\/kb\/#website"},"datePublished":"2018-09-06T13:36:25+00:00","dateModified":"2018-09-06T13:36:25+00:00","breadcrumb":{"@id":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/purepcs.co.uk\/kb\/npm-proxy-settings\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/purepcs.co.uk\/kb\/"},{"@type":"ListItem","position":2,"name":"NPM proxy settings"}]},{"@type":"WebSite","@id":"https:\/\/purepcs.co.uk\/kb\/#website","url":"https:\/\/purepcs.co.uk\/kb\/","name":"Pure PC&#039;s","description":"Ramblings, Knowledge and Musings","publisher":{"@id":"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/d93eda5f74d1012b66a00b4518a0b089"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/purepcs.co.uk\/kb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/d93eda5f74d1012b66a00b4518a0b089","name":"purepcs","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/05a7ed7212adca9fab9199df1a61e3092c4eaf22b6e66ab39599144a212ea6f2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/05a7ed7212adca9fab9199df1a61e3092c4eaf22b6e66ab39599144a212ea6f2?s=96&d=mm&r=g","caption":"purepcs"},"logo":{"@id":"https:\/\/purepcs.co.uk\/kb\/#\/schema\/person\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":1,"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":30,"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/posts\/29\/revisions\/30"}],"wp:attachment":[{"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/purepcs.co.uk\/kb\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}