Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Cannot install packages due to "local issuer" certificate error #782

Open
paulxtiseo opened this issue Apr 12, 2018 · 13 comments
Open

Cannot install packages due to "local issuer" certificate error #782

paulxtiseo opened this issue Apr 12, 2018 · 13 comments

Comments

@paulxtiseo
Copy link

I have a fresh install of Atom on Windows.

Atom : 1.25.1
Electron: 1.7.11
Chrome : 58.0.3029.110
Node : 7.9.0

I cannot install any additional packages due to certificates.

2018-04-12 10_42_44-settings atom

At work, we use Forcepoint for malware protection, and this software presents an FP HTTPS certificate instead of the original site's.

Preliminarily, following install instructions and doing a apm config set strict-ssl false, I am able to see "Featured Packages", but still cannot search Install Packages.

2018-04-12 11_09_50-settings c__users_ptiseo_ atom_ apm atom

Not sure what to do at this point, since official guides and posts on the forum don't seem to solve my specific issue. I feel I need to include the FP cert in a bundle somewhere, but don't know where.

Side note: I have Git separately on my system, and it is able to fetch.

@xmatthias
Copy link

xmatthias commented May 17, 2018

I run into the same issue - however it appears to affect only the Atom UI part of it.
If i run apm search javascript in the terminal (powershell, in my case) it seems to work - and also installing using the command-line works.

@vasiauvi
Copy link

I am behind a corporate proxy and indeed the Atom UI part show the "local issuer" certificate error. But from command line the apm search and apm install is working correctly.

@wvidana
Copy link

wvidana commented Aug 8, 2019

I am behind a corporate proxy and having the same issue. Funny enough the new proxy doesn't need any bash settings, so I can't really set any option to a proxy address.

@wvidana
Copy link

wvidana commented Aug 21, 2019

Worth to mention that apm works just fine, it only fails when using the UI (Atom->Settings->Install)

@Snackin
Copy link

Snackin commented Dec 17, 2019

Worth to mention that apm works just fine, it only fails when using the UI (Atom->Settings->Install)

I second this. Same issue. And same problem as @paulxtiseo. In Ruby on Windows, we solved this by adding my corporate's Certificate bundle in to the certificate chain.

APM searches and installs stuff fine. NPM searches and installs stuff fine. I thought I'd try to change the node version to my Node 13.x - didn't help.

If I could insert a pem or cer file and have it be used in the cert chain for the UI search and install, that'd be great!

@vaibhavg98
Copy link

In your init.coffee file you need to add this
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0

@abhilash-keloth
Copy link

abhilash-keloth commented Jul 22, 2020

Command to install the script has fixed the certificate issue ($ apm install script ).
Ref: https://hackernoon.com/setting-up-atom-as-a-python-ide-a-how-to-guide-o6dd37ff

@ghost
Copy link

ghost commented Dec 6, 2021

First doing apm config set strict-ssl false and then apm install [package name] in the command line worked for me.

@anshikagupta01
Copy link

In your init.coffee file you need to add this process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0

thankyou, it worked.

@thalia2809
Copy link

Thank you @vaibhavg98
it worked!
Go to File > Init Script menu and add the line
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0

@benrose-alation
Copy link

I have the same problem. Adding the suggested line to init.coffee did not work for me. I was able to install using apm on the command line.

By the way, I found the menu option at Atom > Init Script, not File > Init Script - maybe a Mac difference?

@supersmo
Copy link

Best practice is not to disable TLS verification as has been suggested but to make apm accept the corporate ca certificate.

apm is a node js application so add your corporate ca certificate according to node documentation

Creating the following environment variable pointing to the certificate and restarting Atom does the trick:
NODE_EXTRA_CA_CERTS=[your CA certificate file path]

@tenaciousdlg
Copy link

On Atom 1.60 x64 and the NODE_EXTRA_CA_CERTS trick does not work. Are there any plans to support third party CAs?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests