user3544107
user3544107

Reputation: 51

self signed certificate in certificate chain atom

Atom Package install issue.png

Hello, I am using Atom to develop nodejs code for the very first time, problem with accessing the packages tab of the settings. Whenever I search for something, I get this error come up: self signed certificate in certificate chain I have tried uninstalling Atom and reinstalling it, and the same problem comes up. Is this an Atom problem, or more likely something to do with my machine, and if so, what? Am using win10 and my atom version is Atom 1.33.0x64 Any help would be most appreciated, since I don't seem to be able to add extensions any more.

Many thanks, Sathiya

Upvotes: 5

Views: 9525

Answers (6)

JohnW
JohnW

Reputation: 734

If you can get a copy of the self-signed certificate, you may point NODE_EXTRA_CA_CERTS to the self-signed certificate, instead of apm config set strict-ssl false. Here are the steps:

  1. Export the self-signed root CA certificate in PEM format (or Base-64 Encoded X.509 (.CER) on Windows). Sorry, I cannot upload images to illustrate the process. But you may easily find some references by searching "export certificate pem chrome".
  2. Set environment varialble NODE_EXTRA_CA_CERTS:
# Windows
set NODE_EXTRA_CA_CERTS=<absolute-path-to-the-self-signed-root-ca>

# Linux
export NODE_EXTRA_CA_CERTS=<absolute-path-to-the-self-signed-root-ca>
  1. Install the desired Atom plugin:
apm install <plugin-name>

Upvotes: 0

Sanjay Tank
Sanjay Tank

Reputation: 113

Below instructions useful you are behind corporate proxy and using Atom zip download. If you are on windows, Locate you apm.cmd file. mostly at -> cd 'C:\Atom\atom-x64-windows\Atom x64\resources\app\apm\bin\' Execute below command at your windows power shell:

   .\apm.cmd config set strict-ssl false

After this in your Atom,

File -> Settings -> init.coffee

ssl=false
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0
proxy = "http://your.proxy:8080"

Restart your Atom, at try to install

File -> Settings -> Install -> (for eg. minimap)

Restart your Atom.exe

Upvotes: 2

wunt
wunt

Reputation: 139

https://www.juev.org/2018/07/27/atom-ssl/

Because of a poor software architecture decision early in the NPM project, there is an env var that that will reject self-signed certificates, even if you have strict-ssl set to none. The solution is to set NODE_TLS_REJECT_UNAUTHORIZED=0 in your init.coffee (you can test it by running NODE_TLS_REJECT_UNAUTHORIZED=0 atom . and then trying to install a package.

# $EDITOR $ATOM_HOME/init.coffee or ~/.atom/init.coffee
# Disable TLS Verification.
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0

Upvotes: 3

user_dmh
user_dmh

Reputation: 21

On Mac, just setting strict-ssl to false might not work. You may have to set proxy for this.

apm config set proxy http://*****.****.***:<<port>>

apm config set https_proxy http://****.****.****:<<port>>

Upvotes: 0

Pratibha KK
Pratibha KK

Reputation: 1

I also had same issue in Window 10 with atom IDE . Reason is the proxy server which was blocking the connection to install the packages I was looking for . So to address this I downloaded the package using apm command from the command line instance .

I was looking for go-plus package so used command as apm install go-plus

Upvotes: 0

idleberg
idleberg

Reputation: 12872

From the Atom FAQ:

I’m getting an error about a “self-signed certificate”. What do I do?

This means that there is a proxy between you and our servers where someone (typically your employer) has installed a “self-signed” security certificate in the proxy. A self-signed certificate is one that isn’t trusted by anyone but the person who created the certificate. Most security certificates are backed by known, trusted and certified companies. So Atom is warning you that your connection to our servers can be snooped and even hacked by whoever created the self-signed certificate. Since it is self-signed, Atom has no way of knowing who that is.

If you decide that unsecured connections to our servers is acceptable to you, you can use the following instructions.

apm config set strict-ssl false

Upvotes: 4

Related Questions