yarn - Unable to get local issuer certificate - ssl-certificate

I have this problem with Unable to get local issuer certificate.
I already tried yarn config set strict-ssl false. I also set proxy. And also tried npm config set strict-ssl false, but none of these worked.
It's a Windows Computer with a proxy network.
Hope someone can help me here.

Related

Gitlab SSL Handshake failed server most likely require client certificate

Everything was working fine from months I was able to clone/fetch/push/pull from my Gitlab repo on my mac:
Suddenly started to get this error on mac:
When I run the command:
git fetch "repo_link" I get the following error
unable to access : SSL peer handshake failed, the server most likely requires a client certificate to connect.
git config http.sslVerify false is already set.
Even if try to fetch/push/pull from Android studio getting the same error.
Tried clone/fetch on another mac it's working fine.
Please help.
It worked for me by using SSL instead of HTTPS.
I simply added another remote repo using the following command
git remote add org git#gitlab.com:***/***.git
Replace *** with your SSH path details
Then add an SSH to your GitLab account from here
To add an SSH key you need to generate one or use an existing key.
Once the key has been added to your GitLab account you can try
git push -u org master
Try to enable the sslVerify
locally at repo git config http.sslVerify true or globally git config --global http.sslVerify true

serverless deploy From Behind a Proxy?

On a windows machine how do I run serverless deploy from behind a proxy using a cafile?
I am able to install serverless but when I run serverless deploy I get the following error:
Serverless: Injecting required Python packages to package...
Serverless: Recoverable error occurred (unable to get local issuer certificate), sleeping for 5 seconds. Try 1 of 4
I have tried the following solutions, suggested from this issue page, with no benefit:
set environment variable cafile to a path containing my pem file
set environment variable ca to the contents of my pem file
set environment variable NODE_TLS_REJECT_UNAUTHORIZED=0
npm config set cafile = "/path/to/my/cert"
npm config set strict-ssl = false
Try to set default *nix proxy environment variables:
http-proxy and
https-proxy
in the form: http(s)://username:password#proxy.address:proxy_port.
If it is a secure proxy that you use, it might be the proxy certificate or certificate's CA that you need to set as cafile.

Is there a possibility to get rid of Error 407 in NPM?`

there is the following problem:
I am trying to install electron for node.js .I've already downloaded the NPM.
After setting it up, i had to configure our Company Proxy for getting further.
It starts to connect, but stops at some point saying:
"Error: Tunneling socket could not be established, StatusCode= 407";
Now, i don't know how to get further installing Electron.
Can somebody help me?
Many greetings
Jakob
It's proxy issue,these are the workarounds
Method 1:
npm config set proxy http://proxyhost:proxyport
npm config set https-proxy http://proxyhost:proxyport
Notes:
For SSL/https proxies, the protocol in URL should be http not https
If your set up is on a Docker/Vagrant instance or a hosted VM, use IP address instead of hostname for proxy as the later might not be resolvable.
If there is no proxy , remove proxy config from npm
npm config set proxy null
npm config set https-proxy null
Method 2:
You have an environment variable called http_proxy. Please delete it and try again
Method 3: Follow these commands
npm config set proxy false
npm cache clean
Method 4:
Not using any proxy:
npm config rm proxy
npm config rm https-proxy
Using Proxy:
npm config set proxy http://proxyhostname:proxyport
npm config set https-proxy http://proxyhostname:proxyport
For reference
Closed Issue

Self signed certificate SSL Error using self hosted GitLab

I have a hosted Git repo on my company intranet. I can clone, pull, push, etc successfully with command line Git by disabling sslverify. I know this is not ideal but I have no control over our certificate or IT infrastructure so it is what it is.
I paid for GitLab EE, setup the omnibus package and I'm trying to clone the repo via https. However I get an error that it cannot verify the SSL certificate. This is not entirely unexpected but I cannot figure out how to bypass the ssl verification with GitLab EE. In the http settings I set self verified to true and pointed it to my .pem in /etc/gitlab/ssl but I get the same error.
Can I just set sslverify to false like I did command line git?
Since GitLab fails to pull from a Repo because the certificate check failed, you can set git specific settings in your /etc/gitlab/gitlab.rb. There is a key called omnibus_gitconfig['system'] there your config should be something like:
omnibus_gitconfig['system'] = { "http" => ["sslVerify = false"]}
This is bad practice and you should use it with caution.
You could specify the domain to disable certificate checks for with:
omnibus_gitconfig['system'] = { "http \"https://example.com\"" => ["sslVerify = false"]}
You can define it in omnibus configuration package like Fairy says.
Or you can use int a git bash command :
git config --global sslVerify false
This will disable the HTTPS verification of current repository

npm publish on a private server throw error "UNABLE_TO_VERIFY_LEAF_SIGNATURE". But I can curl through SSL the server

FYI my certificate is trusted by GeoTrust SSL CA.
I do the following command :
npm adduser --registry https://npm.****.fr and the error thrown is UNABLE_TO_VERIFY_LEAF_SIGNATURE.
I did a lot of test to fix it.
I try with curl and fix the issue by adding my website CRT on system (/usr/share/ca-certificates/extra/***.crt then dpkg-reconfigure ca-certificates). The same error occured on NPM.
I try to specify option ca, cafile, cert, nothing change.
If I provide the option strictssl=false, it works but I don't really like this option...
Any ideas ?
I had a similar issue, following command did the trick:
npm config set strict-ssl false
export NODE_TLS_REJECT_UNAUTHORIZED=0
I fix it by adding the CA certificate to my server.
Indeed it's the CA certificate missing, not the website certificate. But it is strange that GeoTrust SSL CA is not provide with apt-get install ca-certificates.