Thanks for reaching out again @mittalyashu! Can you update the issue body with the issue template information? The information there is very helpful for us when looking at issues.
Also, I did some searching and found this issue:
atom/apm#103
It seems like following the advice in this FAQ item might help:
https://discuss.atom.io/t/im-getting-an-error-about-a-self-signed-certificate-what-do-i-do/39040
We require the template to be filled out on all new issues and pull requests. We do this so that we can be certain we have all the information we need to address your submission efficiently. This allows the maintainers to spend more time fixing bugs, implementing enhancements, and reviewing and merging pull requests.
Thanks for understanding and meeting us half way 😀
I’ve just installed the Atom text editor. When I try to install my first package I get the following error:-
"Unable to verify the first certificate"
This happens when trying to search for the package e.g. Emmet, AtomLinter. I’ve restarted my machine but I still get the same error message.
My npm and apm configuration settings are as follows :-
$ npm config list && apm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.5.1 node/v8.9.1 win32 x64"
; userconfig C:Usersedwarm4.npmrc
https-proxy = "http://proxy2.nttvpn.via.novonet:80/"
proxy = "http://proxy2.nttvpn.via.novonet:80/"
strict-ssl = false
; builtin config undefined
prefix = "D:\AppData\edwarm4\Application Data\npm"
; node bin location = C:Program Filesnodejsnode.exe
; cwd = C:Program FilesGit
; HOME = C:Usersedwarm4
; "npm config ls -l" to show all defaults.
; cli configs
globalconfig = "C:\Users\edwarm4\.atom\.apm\.apmrc"
user-agent = "npm/3.10.10 node/v6.9.5 win32 x64"
userconfig = "C:\Users\edwarm4\.atom\.apmrc"
; environment configs
node-gyp = "C:/Users/edwarm4/AppData/Local/atom/app-1.25.0/resources/app/apm/bin /../node_modules/.bin/node-gyp"
python = "C:/Users/edwarm4/AppData/Local/atom/app-1.25.0/resources/app/apm/bin/p ython-interceptor.sh"
; userconfig C:Usersedwarm4.atom.apmrc
https-proxy = "http://proxy2.nttvpn.via.novonet:80/"
proxy = "http://proxy2.nttvpn.via.novonet:80/"
strict-ssl = false
; globalconfig C:Usersedwarm4.atom.apm.apmrc
cache = "C:\Users\edwarm4\.atom\.apm"
progress = false
; node bin location = C:Usersedwarm4AppDataLocalatomapp-1.25.0resourcesa ppapmbinnode.exe
; cwd = C:Program FilesGit
; HOME = C:Usersedwarm4
; "npm config ls -l" to show all defaults.
Please help!
Vadim Kotov
8,0648 gold badges48 silver badges62 bronze badges
asked Mar 20, 2018 at 11:08
For me, none of these worked. I have AdGuard installed and had to perform the following (Running on Windows 11):
- Exclude Atom app from filtering by entering the full Atom app path in AdGuard > General Settings > Advanced Settings.
-
- App Path is generally: «C:UsersUSER_NAMEAppDataLocalatomatom.exe»
- Also, you need to add » atom.io » to the HTTPS Exclusions list. (Settings -> Network -> HTTPS filtering -> Exclustions -> + add atom.io -> Then click save).
This made it work for me with no other configuration changes. If you do not have AdGuard or other application of this type installed, then there may be other anti-virus/Anti-malware applications you may need to exclude this app from.
Dharman♦
30.5k22 gold badges84 silver badges133 bronze badges
answered Dec 2, 2021 at 18:16
DC.SkellsDC.Skells
8101 gold badge8 silver badges17 bronze badges
With strict-ssl = false
set, perhaps using the command line will work?
e.g.
apm search package-name
apm install package-name
answered Apr 15, 2019 at 11:25
johnbtjohnbt
5921 gold badge8 silver badges21 bronze badges
If you’re on Windows 10, temporarily turn off Ransomware Protection. RP running will cause this issue.
answered Apr 8, 2020 at 15:03
Here is a solution in the official Atom repo: link
However, for me it was enough to turn off the VPN and install worked.
answered Apr 6, 2022 at 16:20
chrischris
2,3904 gold badges31 silver badges55 bronze badges
I’ve just installed the Atom text editor. When I try to install my first package I get the following error:-
"Unable to verify the first certificate"
This happens when trying to search for the package e.g. Emmet, AtomLinter. I’ve restarted my machine but I still get the same error message.
My npm and apm configuration settings are as follows :-
$ npm config list && apm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.5.1 node/v8.9.1 win32 x64"
; userconfig C:Usersedwarm4.npmrc
https-proxy = "http://proxy2.nttvpn.via.novonet:80/"
proxy = "http://proxy2.nttvpn.via.novonet:80/"
strict-ssl = false
; builtin config undefined
prefix = "D:AppDataedwarm4Application Datanpm"
; node bin location = C:Program Filesnodejsnode.exe
; cwd = C:Program FilesGit
; HOME = C:Usersedwarm4
; "npm config ls -l" to show all defaults.
; cli configs
globalconfig = "C:Usersedwarm4.atom.apm.apmrc"
user-agent = "npm/3.10.10 node/v6.9.5 win32 x64"
userconfig = "C:Usersedwarm4.atom.apmrc"
; environment configs
node-gyp = "C:/Users/edwarm4/AppData/Local/atom/app-1.25.0/resources/app/apm/bin /../node_modules/.bin/node-gyp"
python = "C:/Users/edwarm4/AppData/Local/atom/app-1.25.0/resources/app/apm/bin/p ython-interceptor.sh"
; userconfig C:Usersedwarm4.atom.apmrc
https-proxy = "http://proxy2.nttvpn.via.novonet:80/"
proxy = "http://proxy2.nttvpn.via.novonet:80/"
strict-ssl = false
; globalconfig C:Usersedwarm4.atom.apm.apmrc
cache = "C:Usersedwarm4.atom.apm"
progress = false
; node bin location = C:Usersedwarm4AppDataLocalatomapp-1.25.0resourcesa ppapmbinnode.exe
; cwd = C:Program FilesGit
; HOME = C:Usersedwarm4
; "npm config ls -l" to show all defaults.
Please help!
Vadim Kotov
7,9448 gold badges47 silver badges62 bronze badges
asked Mar 20, 2018 at 11:08
For me, none of these worked. I have AdGuard installed and had to perform the following (Running on Windows 11):
- Exclude Atom app from filtering by entering the full Atom app path in AdGuard > General Settings > Advanced Settings.
-
- App Path is generally: «C:UsersUSER_NAMEAppDataLocalatomatom.exe»
- Also, you need to add » atom.io » to the HTTPS Exclusions list. (Settings -> Network -> HTTPS filtering -> Exclustions -> + add atom.io -> Then click save).
This made it work for me with no other configuration changes. If you do not have AdGuard or other application of this type installed, then there may be other anti-virus/Anti-malware applications you may need to exclude this app from.
Dharman♦
29.2k21 gold badges79 silver badges131 bronze badges
answered Dec 2, 2021 at 18:16
DC.SkellsDC.Skells
7701 gold badge7 silver badges17 bronze badges
With strict-ssl = false
set, perhaps using the command line will work?
e.g.
apm search package-name
apm install package-name
answered Apr 15, 2019 at 11:25
johnbtjohnbt
5831 gold badge8 silver badges21 bronze badges
If you’re on Windows 10, temporarily turn off Ransomware Protection. RP running will cause this issue.
answered Apr 8, 2020 at 15:03
Here is a solution in the official Atom repo: link
However, for me it was enough to turn off the VPN and install worked.
answered Apr 6, 2022 at 16:20
chrischris
2,2363 gold badges30 silver badges52 bronze badges
Попытался использовать Atom
в корпоративной среде и столкнулся с тем, что редактор не смог обратиться ни к репозиторию пакетов, ни к репозиторию тем. Получал ошибку вида Unable to get local issuer certificate
.
Поиск дал результат, необходимо изменить настройки apm, либо выполнив команду:
apm config set strict-ssl false
Либо вручную добавив строку:
к файлу ~/.atom./apmrc
. Но как показал опыт, проблему это не решило. В самом редакторе по прежнему ловил описанную выше ошибку.
Решение нашлось на одной из страниц discuss.atom.io
:
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
# Disable TLS Verification.
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0
Добавил указанную строку в файл init.coffee
, перезапустил редактор. Проблема была решена.
unable to verify the first certificate
Цепочка сертификатов неполная.
Это означает, что веб-сервер, к которому вы подключаетесь, неправильно настроен и не включил промежуточный сертификат в цепочку сертификатов, которую он вам отправил.
Цепочка сертификатов
Скорее всего, это выглядит так:
- Сертификат сервера — хранит сертификат, подписанный промежуточным звеном.
- Промежуточный сертификат — хранит сертификат, подписанный root.
- Корневой сертификат — хранит самозаверяющий сертификат.
На сервере должен быть установлен промежуточный сертификат вместе с сертификатом сервера.
Корневые сертификаты встроены в программные приложения, браузеры и операционные системы.
Приложение, обслуживающее сертификат, должно отправить полную цепочку, то есть сам сертификат сервера и все промежуточные звенья. Предполагается, что корневой сертификат известен клиенту.
Воссоздайте проблему
Перейдите на https://incomplete-chain.badssl.com в браузере.
Ошибок не отображается (замок в адресной строке зеленый).
Это потому, что браузеры, как правило, завершают цепочку, если она не отправляется с сервера.
Теперь подключитесь к https://incomplete-chain.badssl.com, используя Node:
// index.js
const axios = require('axios');
axios.get('https://incomplete-chain.badssl.com')
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
Журналы: « Ошибка: не удалось проверить первый сертификат ».
Решение
Вам необходимо самостоятельно заполнить цепочку сертификатов.
Для этого:
1: Вам нужно получить недостающий промежуточный сертификат в .pem
формате, затем
2a: расширить встроенное хранилище сертификатов Node, используя NODE_EXTRA_CA_CERTS
,
2b: или передайте собственный комплект сертификатов (промежуточные и корневой) с помощью ca
option.
1. Как получить промежуточный сертификат?
Использование openssl
(поставляется с Git для Windows ).
Сохраните данные сертификата удаленного сервера:
openssl s_client -connect incomplete-chain.badssl.com:443 -servername incomplete-chain.badssl.com | tee logcertfile
Ищем эмитента (промежуточный сертификат является эмитентом / подписчиком сертификата сервера):
openssl x509 -in logcertfile -noout -text | grep -i "issuer"
Он должен предоставить вам URI сертификата подписи. Загрузить:
curl --output intermediate.crt http://cacerts.digicert.com/DigiCertSHA2SecureServerCA.crt
Наконец, преобразуйте его в .pem
:
openssl x509 -inform DER -in intermediate.crt -out intermediate.pem -text
2а. NODE_EXTRA_CERTS
Я использую cross-env для установки переменных среды в package.json
файле:
"start": "cross-env NODE_EXTRA_CA_CERTS="C:UsersUSERNAMEDesktopssl-connectintermediate.pem" node index.js"
2b. ca
вариант
Эта опция будет перезаписывать встроенные корневые центры сертификации узла.
Вот почему нам нужно создать собственный корневой ЦС. Используйте ssl-root-cas .
Затем создайте настраиваемый https
агент, настроенный с помощью нашего пакета сертификатов (корневой и промежуточный). Передайте этого агента axios
при отправке запроса.
// index.js
const axios = require('axios');
const path = require('path');
const https = require('https');
const rootCas = require('ssl-root-cas').create();
rootCas.addFile(path.resolve(__dirname, 'intermediate.pem'));
const httpsAgent = new https.Agent({ca: rootCas});
axios.get('https://incomplete-chain.badssl.com', { httpsAgent })
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
Вместо того, чтобы создавать настраиваемый https
агент и передавать его axios
, вы можете разместить сертификаты на https
глобальном агенте:
// Applies to ALL requests (whether using https directly or the request module)
https.globalAgent.options.ca = rootCas;
Ресурсы:
- https://levelup.gitconnected.com/how-to-resolve-certificate-errors-in-nodejs-app-involving-ssl-calls-781ce48daded
- https://www.npmjs.com/package/ssl-root-cas
- https://github.com/nodejs/node/issues/16336
- https://www.namecheap.com/support/knowledgebase/article.aspx/9605/69/how-to-check-ca-chain-installation
- /superuser/97201/how-to-save-a-remote-server-ssl-certificate-locally-as-a-file/
- Как конвертировать .crt в .pem
не удалось проверить первый сертификат
Я использую openssl для создания собственного сертификата CA на ubuntu gnome 16.04 и использую этот сертификат CA для подписания сертификата для postfix и httpd, но при использовании tls для подключения postfix команда была:
openssl s_client -connect xiedeacc.com:587 -starttls smtp
он будет жаловаться на
, и он возвращает:
verify error:num=21:unable to verify the first certificate
Verify return code: 21 (unable to verify the first certificate)
, но при изменении команды на
openssl s_client -connect xiedeacc.com:587 -starttls smtp -CAfile /etc/ssl/certs/xiedeaccca.crt
вывод был прав, не проблема, поэтому я думаю, что это opensl. s_client не может найти этот самозаверяющий CA, но хром может посетить этот веб-сайт, подписанный CA, после того, как я вручную импортирую его в список корней хром cert. Итак, как импортировать его в корневой каталог корневого каталога Ubuntu, но не только в список сертификатов корня Chrome? Поддерживает ли Ubuntu сертификаты CA как окна?
задан
10 September 2017 в 09:57
поделиться
2 ответа
, чтобы импортировать ваш самоподписанный CA в список корневых сертификатов на Ubuntu, вам придется настроить ca-certificates:
во-первых, создайте каталог с названием /usr/share/ca-certificates/extra:
sudo mkdir /usr/share/ca-certificates/extra`
затем скопируйте ваш сертификат центра сертификации в каталог:
sudo cp /etc/ssl/certs/xiedeaccca.crt /usr/share/ca-certificates/extra/xiedeaccca.crt
в конце концов, переконфигурировать ca-certificates:
sudo dpkg-reconfigure ca-certificates
нажмите [F7], чтобы выбрать самостоятельно подписанные сертификаты ЦС, и вы должно быть сделано.
ответ дан Cynplytholowazy
18 July 2018 в 07:07
поделиться
Чтобы импортировать самозаверяющий ЦС в корневой каталог сертификата Ubuntu, вам необходимо настроить ca-certificates:
Сначала создайте каталог с именем /usr/share/ca-certificates/extra:
sudo mkdir /usr/share/ca-certificates/extra`
Затем скопируйте свой сертификат CA в каталог:
sudo cp /etc/ssl/certs/xiedeaccca.crt /usr/share/ca-certificates/extra/xiedeaccca.crt
Наконец, переконфигурируйте ca-certificates:
sudo dpkg-reconfigure ca-certificates
Нажмите Space на выберите ваши собственные сертификаты CA, и вы должны сделать это.
ответ дан Cynplytholowazy
24 July 2018 в 18:44
поделиться
Другие вопросы по тегам:
Похожие вопросы:
Я только что установил текстовый редактор Atom. Когда я пытаюсь установить свой первый пакет, я получаю следующую ошибку: —
"Unable to verify the first certificate"
Это происходит при поиске пакета, например. Эммет, АтомЛинтер. Я перезапустил свой компьютер, но по-прежнему получаю то же сообщение об ошибке.
Мои настройки конфигурации npm и apm следующие: —
$ npm config list && apm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.5.1 node/v8.9.1 win32 x64"
; userconfig C:Usersedwarm4.npmrc
https-proxy = "http://proxy2.nttvpn.via.novonet:80/"
proxy = "http://proxy2.nttvpn.via.novonet:80/"
strict-ssl = false
; builtin config undefined
prefix = "D:\AppData\edwarm4\Application Data\npm"
; node bin location = C:Program Filesnodejsnode.exe
; cwd = C:Program FilesGit
; HOME = C:Usersedwarm4
; "npm config ls -l" to show all defaults.
; cli configs
globalconfig = "C:\Users\edwarm4\.atom\.apm\.apmrc"
user-agent = "npm/3.10.10 node/v6.9.5 win32 x64"
userconfig = "C:\Users\edwarm4\.atom\.apmrc"
; environment configs
node-gyp = "C:/Users/edwarm4/AppData/Local/atom/app-1.25.0/resources/app/apm/bin /../node_modules/.bin/node-gyp"
python = "C:/Users/edwarm4/AppData/Local/atom/app-1.25.0/resources/app/apm/bin/p ython-interceptor.sh"
; userconfig C:Usersedwarm4.atom.apmrc
https-proxy = "http://proxy2.nttvpn.via.novonet:80/"
proxy = "http://proxy2.nttvpn.via.novonet:80/"
strict-ssl = false
; globalconfig C:Usersedwarm4.atom.apm.apmrc
cache = "C:\Users\edwarm4\.atom\.apm"
progress = false
; node bin location = C:Usersedwarm4AppDataLocalatomapp-1.25.0resourcesa ppapmbinnode.exe
; cwd = C:Program FilesGit
; HOME = C:Usersedwarm4
; "npm config ls -l" to show all defaults.
Пожалуйста помоги!
Спасибо, что снова обратились к @mittalyashu! Можете ли вы обновить тело задачи, указав информацию о шаблоне задачи? Информация там очень полезна для нас при рассмотрении вопросов.
Кроме того, я немного поискал и нашел эту проблему:
https://github.com/atom/apm/issues/103
Похоже, что следование советам в этом разделе часто задаваемых вопросов может помочь:
https://discuss.atom.io/t/im-getting-an-error-about-a-self-signed-certificate-what-do-i-do/39040
Мы требуем заполнения шаблона для всех новых задач и запросов на вытягивание. Мы делаем это, чтобы быть уверенными, что у нас есть вся информация, необходимая для эффективного рассмотрения вашей заявки. Это позволяет сопровождающим уделять больше времени исправлению ошибок, внедрению улучшений, а также просмотру и объединению запросов на вытягивание.
Спасибо за понимание и встречу на полпути :grinning:
Использование этой команды решает проблему.
apm config set strict-ssl false
Но что означает эта команда?
все еще происходит, временное решение устанавливает пакеты из командной строки
У меня работает атом/apm#103
Установка переменной среды
NODE_TLS_REJECT_UNAUTHORIZED=0
где ввести apm config set strict-ssl false эта команда в командной строке
Это все еще происходит, хотя я установил ssl false, конфликтует ли это с новой версией nodejs?
Выполните следующие команды:
$ apm config set strict-ssl false
$ apm config set NODE_TLS_REJECT_UNAUTHORIZED 0
В моем случае это было вызвано запуском Fiddler
.
Я открываю командную строку и ввожу:
Конфигурация apm устанавливает strict-ssl false
и все же ничего не происходит
То же самое, чувак, я понятия не имею, как решить эту проблему, я даже не могу скачать компилятор gpp для своего проекта cpp
У кого-нибудь есть решение для этого? У меня та же проблема, несмотря на то, что я установил apm config set strict-ssl false
и apm config set NODE_TLS_REJECT_UNATHORIZED 0
. Мне нужно вручную установить пакеты, используя apm install
. Также подтвердил, что обе настройки находятся в .apmrc.
apm config list
показывает:
C:Usersmatth>apm config list
; cli configs
globalconfig = "C:\Users\matth\.atom\.apm\.apmrc"
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.2.0 node/v10.2.1 win32 x64"
userconfig = "C:\Users\matth\.atom\.apmrc"
; userconfig C:Usersmatth.atom.apmrc
NODE_TLS_REJECT_UNAUTHORIZED = "0"
strict-ssl = false
; globalconfig C:Usersmatth.atom.apm.apmrc
cache = "C:\Users\matth\.atom\.apm"
progress = false
; node bin location = C:UsersmatthAppDataLocalatomapp-1.47.0resourcesappapmbinnode.exe
; cwd = C:Usersmatth
; HOME = C:Usersmatth
; "npm config ls -l" to show all defaults.
У меня такая же проблема.
У меня такая же проблема.
Я обнаружил, что моя проблема возникла из-за моего различного программного обеспечения для защиты от рекламы. Я не помню конкретно, что это было, поскольку я прыгал между Pi-hole и AdGuard, однако, если я правильно помню, это была моя настройка рабочего стола AdGuard, которая мешала этому. В частности, один из параметров, связанных с SSL. Поэтому я бы посоветовал попробовать отключить любую защиту от рекламы или фильтрацию DNS, которая у вас есть, и попробовать еще раз, чтобы посмотреть, поможет ли это.
В конце концов, несмотря на то, что я хотел использовать Atom, я просто остановился на VSCode вместо того, чтобы отключать AdGuard каждый раз, когда хотел добавить расширение.
отключите ваш adguard или любое альтернативное программное обеспечение
это хорошо работает со мной
отключите ваш adguard или любое альтернативное программное обеспечение
это хорошо работает со мной
Спасибо! Нет необходимости полностью отключать AdGuard. Просто исключите приложение Atom из фильтрации, введя полный путь к приложению Atom в AdGuard > Общие настройки > Дополнительные настройки.