
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2021 02:08 PM
Hello Guys,
I have tried to login to my PDI, using NOW-CLI tool! but unfortunatly i obstructed by this showen error:
unable to get local issuer certificate
λ now-cli login --host https://xxx-xxx.service-now.com --password xxxxxx
× Connection to 'https://xxx-xxx.service-now.com' failed. Credentials not saved.
unable to get local issuer certificate
login [host] [method] [username] [password]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--host glide instance url [string] [default: "https://localhost:8443"]
--method authentication method [choices: "basic"] [default: "basic"]
--username basic auth username [string] [default: "admin"]
--password basic auth password [string] [default: "admin"]
My development environment detail:
λ node -v
v14.17.2
λ npm -v
6.14.13
λ now-cli --version
Now CLI @19.0.0
λ npm list -g --depth 0
C:\Program Files\nodejs
+-- @servicenow/cli@19.0.0
+-- keytar@7.7.0
`-- npm@6.14.13
npm ERR! peer dep missing: @octokit/core@>=3, required by @octokit/plugin-request-log@1.0.4
---------------------------------------------
1- Global installation folder(C:\Program Files\nodejs) --> accessible for admins/trusted users.
2- I ran the command as an administrator.
Any suggestion or ideas would be much appreciated thank you all 🙂
Best regards,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2021 02:15 PM
Hello,
Finally, the solution was to set reject unauthorized TLS to no (windows - CMD command):
set NODE_TLS_REJECT_UNAUTHORIZED=0
Hope this will help people who had faced the same issue as me!
Best regards 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2021 07:20 AM
Hi,
As a workaround solution is to create the project offline (Windows 10 environment):
NPM:
- set NODE_TLS_REJECT_UNAUTHORIZED=0
- npm config set strict-ssl false
- VC_redist.x64.exe
- python-2.7.amd64
- npm config set python C:\Python27 (python27 path)
- npm install --global --production windows-build-tools
NowUI Framework:
- snc extension add --name ui-component
- snc configure profile set
- snc ui-component project --name {comp-name} --description {description} --profile {profile} --offline --scope {scope}
- npm i
- npm audit fix
- snc ui-component develop
- snc ui-component deploy
Issue still same when i try to deploy the component or login to my instance using now-cli tool:
Login:
now-cli login --host https://xxx.service-now.com --method basic --username xxxx --password xxxxx
× Connection to 'https://xxx.service-now.com' failed. Credentials not saved.
unable to get local issuer certificate
or
snc ui-component login https://xxx.service-now.com basic xxxx xxxxx
× Connection to 'https://xxx.service-now.com' failed. Credentials not saved.
unable to get local issuer certificate
Regards,
Islam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2021 02:15 PM
Hello,
Finally, the solution was to set reject unauthorized TLS to no (windows - CMD command):
set NODE_TLS_REJECT_UNAUTHORIZED=0
Hope this will help people who had faced the same issue as me!
Best regards 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 12:06 AM
Hy guys I have the same issue.
This is my environment:
node -v
v16.13.1
npm -v 8.1.2
snc version
{ "extensions":
{
"ui-component": "21.0.7"
},
"snc": "1.1.0"
}
content of file C:\Users\my-user\.npmrc
strict-ssl=false
cafile=C:\Users\my-user\Documents\sviluppo\snow.crt
I tried to exec the command (but without success)
set NODE_TLS_REJECT_UNAUTHORIZED=0
I tried to exec the command (but without success)
npm config set strict-ssl false
I tried to download the servicenow certificate and convert it to PEM and add it to .npmrc file and to Windows system environment variables (but without success)
Is there something else that I can try?
Could it be a problem of windows setting? some restriction? How can I check it?
Any help or suggestion are appreciated
PS
I try to connect to a free development instance of servicenow from a Windows 10 PC, using powershell terminal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2022 11:39 AM
HI Michele,
Did you run this command as an administrator?
set NODE_TLS_REJECT_UNAUTHORIZED=0
Please try to follow thses steps:
NPM:
- set NODE_TLS_REJECT_UNAUTHORIZED=0
- npm config set strict-ssl false
- VC_redist.x64.exe --> install it
- python-2.7.amd64 --> install it
- npm config set python C:\Python27 (python27 path)
- npm install --global --production windows-build-tools
Regards,
Islam