Installing NativeScript showed some problems when installing the following: all packages for the Android SDK Platform 25, Android SDK Build-Tools 25.0.2 or later, Android Support Repository, Google Repository and any other SDKs that you may need.
command: sudo $ANDROID_HOME/tools/bin/sdkmanager "tools" "platform-tools" "platforms;android-25" "build-tools;25.0.2" "extras;android;m2repository" "extras;google;m2repository"
$ sudo $ANDROID_HOME/tools/bin/sdkmanager "tools" "platform-tools" "platforms;
> android-25" "build-tools;
> 25.0.2" "extras;
> android;
> m2repository" "extras;
> google;
> m2repository"
Warning: File /root/.android/repositories.cfg could not be loaded.
Warning: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
Warning: Failed to download any source lists!
Warning: Failed to find package tools
I am stuck on this. Can someone lend me a hand?
Using strace:
$ strace -e trace=network -y -s 256 -f -o strace.log tools/bin/sdkmanager --update
I found a reference to "Equifax Secure Certificate Authority" in strace.log coming from IP address 172.217.23.46, which according to whois belongs to google.
Then using openssl to check the certificate:
$ openssl s_client -connect 172.217.23.46:443
...
Certificate chain
0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.google.com
i:/C=US/O=Google Inc/CN=Google Internet Authority G2
1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
This Equifax certificate was revoked according to https://www.geotrust.com/resources/repository/crls/ so this is up to google to replace the certificate.
Equifax appears to be no longer trusted by Ubuntu 16.04 (the system I'm testing this on).
I have contacted google about this.
Edit: Google responded with "Won't fix".
Related
I am trying to install go tools in my WSL
command :
go get -v golang.org/x/tools/gopls
Error :
go get: module golang.org/x/tools/gopls: Get "https://proxy.golang.org/golang.org/x/tools/gopls/#v/list": x509: certificate signed by unknown authority
Error Msg : x509: certificate signed by unknown authority
Check first if this is similar to golang/go issue 45569, and check the ouput of
openssl s_client -showcerts -connect proxy.golang.org:443 </dev/null | openssl x509 -text -noout
In that issue, behind a corporate network, disabling NetScope was needed.
This is probably because in a clean WSL with only golang installed.
Try install ca-certificates, it may solve the issue.
This arose from How to install gdb (debugger) in Mac OSX El Capitan?.
I have macports working under el capitan no problem and have installed the gdb port but I can't get the codesigning to work. It all seems to have worked. The certificate is there and "Always Trust" is set. The binary shows:
$ codesign -d -v -v /opt/local/bin/ggdb
Executable=/opt/local/bin/ggdb
Identifier=org.gnu.gdb
Format=Mach-O thin (x86_64)
CodeDirectory v=20100 size=25320 flags=0x0(none) hashes=1261+2 location=embedded
Signature size=1392
Authority=gdb-cert
Signed Time=23 Oct 2015, 07:56:53
Info.plist entries=4
TeamIdentifier=not set
Sealed Resources=none
Internal requirements count=1 size=88
but I get
(gdb) r
Starting program: /Users/sal/Katiss/ecodriving
Unable to find Mach task port for process-id 39278: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
when I try to start debugging something.
Any ideas?
I just settled this problem by using the following command.
sudo dseditgroup -o edit -a yourusername -t user procmod
Which adds you to group procmod.
It's just because only users in procmod can use function task_for_pid, and you can find that the own group of /opt/local/bin/ggdb is procmod.
I installed MacPorts gcc9 (gcc-9.2.0) on an older iMac (10.11.6 El Capitan), and recently needed to install the gdb port (gdb-9.1.0); predictably encountering the same code-signing / permission issue.
There's a list of instructions on github that worked perfectly for me, simply replacing: /usr/local/bin/gdb with: /opt/local/bin/ggdb. Since such snippets on github may be ephemeral, so I'll paste it here:
Open Keychain Access
In the menu, open Keychain Access > Certificate Assistant > Create a certificate
Give it a name (e.g. gdbc)
Identity type: Self Signed Root
Certificate type: Code Signing
Check: let me override defaults
Continue until it prompts you for: "specify a location for..."
Set Keychain location to System
Create a certificate and close assistant.
Find the certificate in System keychains, right click it > get info (or just double click it)
Expand Trust, set Code signing to always trust
Restart taskgated in terminal: killall taskgated
Enable root account:
Open System Preferences
Go to User & Groups > Unlock
Login Options > "Join" (next to Network Account Server)
Click "Open Directory Utility"
Go up to Edit > Enable Root User
Run codesign -fs gdbc /usr/local/bin/gdb in terminal: this asks for the root password
Disable root account (see #10)
Done!
I get the following error running curl https://npmjs.org/install.sh | sh on Mac OSX 10.9 (Mavericks):
install npm#latest
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html
How do I fix this?
First off, you should be wary of urls that throw SSL errors. That being said, you can suppress certificate errors in curl with
curl -k https://insecure.url/content-i-really-really-trust
Using the Safari browser (not Chrome, Firefox or Opera) on Mac OS X 10.9 (Mavericks) visit https://registry.npmjs.org
Click the Show certificate button and then check the checkbox labelled Always trust. Then click Continue and enter your password if required.
Curl should now work with that URL correctly.
NOTE: This answer obviously defeats the purpose of SSL and should be used sparingly as a last resort.
For those having issues with scripts that download scripts that download scripts and want a quick fix, create a file called ~/.curlrc
With the contents
--insecure
This will cause curl to ignore SSL certificate problems by default.
Make sure you delete the file when done.
UPDATE
12 days later I got notified of an upvote on this answer, which made me go "Hmmm, did I follow my own advice remember to delete that .curlrc?", and discovered I hadn't. So that really underscores how easy it is to leave your curl insecure by following this method.
The problem is an expired intermediate certificate that is no longer used and must be deleted. Here is a blog post from Digicert explaining the issue and how to resolve it.
https://blog.digicert.com/expired-intermediate-certificate/
I was seeing the issue with Github not loading via SSL in both Safari and the command line with git pull. Once I deleted the old expired cert everything was fine.
After updating to OS X 10.9.2, I started having invalid SSL certificate issues with Homebrew, Textmate, RVM, and Github.
When I initiate a brew update, I was getting the following error:
fatal: unable to access 'https://github.com/Homebrew/homebrew/': SSL certificate problem: Invalid certificate chain
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
I was able to alleviate some of the issue by just disabling the SSL verification in Git. From the console (a.k.a. shell or terminal):
git config --global http.sslVerify false
I am leary to recommend this because it defeats the purpose of SSL, but it is the only advice I've found that works in a pinch.
I tried rvm osx-ssl-certs update all which stated Already are up to date.
In Safari, I visited https://github.com and attempted to set the certificate manually, but Safari did not present the options to trust the certificate.
Ultimately, I had to Reset Safari (Safari->Reset Safari... menu). Then afterward visit github.com and select the certificate, and "Always trust" This feels wrong and deletes the history and stored passwords, but it resolved my SSL verification issues. A bittersweet victory.
On MacOS High Sierra/10.13:
~$brew install curl ca-certificates
works like a charm for me.
Another cause of this can be duplicate keys in your KeyChain. I've seen this problem on two macs where there were duplicate "DigiCert High Assurance EV Root CA". One was in the login keychain, the other in the system one. Removing the certificate from the login keychain solved the problem.
This affected Safari browser as well as git on the command line.
Let's say you try to download something using curl or install hub
using brew, then, you get an error like:
==> Downloading https://ghcr.io/v2/linuxbrew/core/ncurses/manifests/6.2
curl: (60) SSL certificate problem: unable to get local issuer certificate
Then, let ghcr.io being the server, execute following commands:
cd ~
# Download the cert:
openssl s_client -showcerts -servername ghcr.io -connect ghcr.io:443 > cacert.pem
# type "quit", followed by the "ENTER" key / or Ctrl+C
# see the data in the certificate:
openssl x509 -inform PEM -in cacert.pem -text -out certdata-ghcr.io.txt
# move the file to certificate store directory:
sudo mv cacert.pem /usr/local/share/ca-certificates/cacert-ghcr.io.crt
# update certificates
sudo update-ca-certificates
# done !
References
SSL Certificate Verification
Snippet
After attempting all of the above solutions to eliminate the "curl: (60) SSL certificate problem: unable to get local issuer certificate" error, the solution that finally worked for me on OSX 10.9 was:
Locate the curl certificate PEM file location
'curl-config --ca' -- > /usr/local/etc/openssl/cert.pem
Use the folder location to identify the PEM file
'cd /usr/local/etc/openssl'
Create a backup of the cert.pem file
'cp cert.pem cert_pem.bkup'
Download the updated Certificate file from the curl website
'sudo wget http://curl.haxx.se/ca/cacert.pem'
Copy the downloaded PEM file to replace the old PEM file
'cp cacert.pem cert.pem'
This is a modified version of a solution posted to correct the same issue in Ubuntu found here:
https://serverfault.com/questions/151157/ubuntu-10-04-curl-how-do-i-fix-update-the-ca-bundle
I started seeing this error after installing the latest command-line tools update (6.1) on Yosemite (10.10.1). In this particular case, a reboot of the system fixed the error (I had not rebooted since the update).
Mentioning this in case anyone with the same problem comes across this page, like I did.
In some systems like your office system, there is sometimes a firewall/security client that is installed for security purpose. Try uninstalling that and then run the command again, it should start the download.
My system had Netskope Client installed and was blocking the ssl communication.
Search in finder -> uninstall netskope, run it, and try installing homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
PS: consider installing the security client.
If you are behind a corporate firewall like Palo Alto it will intercept all TLS/SSL traffic, inspect it and re-encrypt it using its own using self-signed certificates. Although these certificates will typically be available on your workstation, the various programs like npm, Git, curl, etc. will not inherit them from the workstation.
If you are working in an enterprise do not use the -k or --insecure option because this turns of the TLS/SSL encryption completely and opens up you and your organization to compromise
The solution is to add this self signed certificate to the specific certificate chain that is used by the program you are trying to use. I have included a link to Adrian Escutia Soto's answer which is the best way of addressing this. Unfortunately, I cannot comment or upvote on it because I don't have enough reputation points
I need to install my self-signed certificate in my clients machine and follwed the steps in this link.
But in the command in this document shows certmgr.exe -add good.cer -c -s -r localMachine TrustedPublisher where as the document in WDK "WinDDK/7600.16385.1/src/general/build/driversigning/selfsign_readme.htm#_Toc138233166" has the same command named as "trustedpublisher".
certmgr.exe -add certfilename.cer -s -r localMachine trustedpublisher
Which one is correct among this? Where the certificate will be installed? Also,
I can only find folder named "Trusted Publisher" in my Pc.
So where should I install the certificate apart from "Root"?
Please guide me..
Since TrustedPUblisher in this case is a certificate store, and not a command line parameter, and Microsoft Windows is not case sensitive for this kind of thing, either case should work.
For a self-signed certificate, you should most likely add the certificate to both Root and TrustedPublisher.
For example, running wget https://www.dropbox.com results in the following errors:
ERROR: The certificate of `www.dropbox.com' is not trusted.
ERROR: The certificate of `www.dropbox.com' hasn't got a known issuer.
If you don't care about checking the validity of the certificate just add the --no-check-certificate option on the wget command-line. This worked well for me.
NOTE: This opens you up to man-in-the-middle (MitM) attacks, and is not recommended for anything where you care about security.
Looking at current hacky solutions in here, I feel I have to describe a proper solution after all.
First, you need to install the cygwin package ca-certificates via Cygwin's setup.exe to get the certificates.
Do NOT use curl or similar hacks to download certificates (as a neighboring answer advices) because that's fundamentally insecure and may compromise the system.
Second, you need to tell wget where your certificates are, since it doesn't pick them up by default in Cygwin environment. If you can do that either with the command-line parameter --ca-directory=/usr/ssl/certs (best for shell scripts) or by adding ca_directory = /usr/ssl/certs to ~/.wgetrc file.
You can also fix that by running ln -sT /usr/ssl /etc/ssl as pointed out in another answer, but that will work only if you have administrative access to the system. Other solutions I described do not require that.
If the problem is that a known root CA is missing and when you are using ubuntu or debian, then you can solve the problem with this one line:
sudo apt-get install ca-certificates
May be this will help:
wget --no-check-certificate https://blah-blah.tld/path/filename
First, the SSL certificates need to be installed. Instructions (based on https://stackoverflow.com/a/4454754/278488):
pushd /usr/ssl/certs
curl http://curl.haxx.se/ca/cacert.pem | awk 'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {print > "cert" n ".pem"}'
c_rehash
The above is enough to fix curl, but wget requires an extra symlink:
ln -sT /usr/ssl /etc/ssl
apt-get install ca-certificates
The s makes the difference ;)
I have the similar problem and fixed it by temporarily disabling my antivirus(Kaspersky Free 18.0.0.405). This AV has HTTPS interception module that automatically self-sign all certificates it finds in HTTPS responses.
Wget from Cygwin does not know anything about AV root certificate, so when it finds that website's certificate was signed with non trust certificate it prints that error.
To fix this permanently without disabling AV you should copy the AV root certificate from Windows certificate store to /etc/pki/ca-trust/source/anchors as .pem file(base64 encoding) and run update-ca-trust
In my case, on raspberry pi 3B the timing was in the future (2025) that I need to update to the current local time using ntpdate by passing the time to the past and it solved the issue.
$ sudo date +%Y%m%d -s "20210101"
$ sudo ntpdate times1.mike.fi
I had a similar problem with wget to my own live web site returning errors after installing a new SSL certificate. I'd already checked several browsers and they didn't report any errors:
wget --no-cache -O - "https://example.com/..." ERROR: The certificate of ‘example.com’ is not trusted. ERROR: The certificate of ‘example.com’ hasn't got a known issuer.
The problem was I had installed the wrong certificate authority .pem/.crt file from the issuer. Usually they bundle the SSL certificate and CA file as a zip file, but DigiCert email you the certificate and you have to figure out the matching CA on your own. https://www.digicert.com/help/ has an SSL certificate checker which lists the SSL authority and the hopefully matching CA with a nice blue link graphic if they agree:
`SSL Cert: Issuer GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1
CA: Subject GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1
Valid from 16/Jul/2020 to 31/May/2023
Issuer DigiCert Global Root CA`
We just had this same issue come up when we installed a newly minted certificate just this last week. I've also seen it two other times...yet I'm slow to learn. In all 3 cases I had to get the "intermediate certificates" and install them. In other words My cert was good but it's signer or it's signer's signer wasn't correctly installed. Make sure you go to your certificate provider's site and get the correct intermediate certificates and install them as well on your server and then this warning will go away.
It might not JUST be the above, it could also be that clients don't have updated lists...but I would make sure it's not just you not fully installing the certificates right FIRST, and then after that going on to the clients and making sure their list is updated.
Not exactly the same issue. On docker, I was mounting my host filesystem to /etc where OpenSSL certs were already installed which gets overwritten.
Changing the mounting to different filesystem fixed it.
Thanks to Denis Bakharev I've solved that case.
If someone has Cygwin wget not working because 'certificate not trusted' and having ca-certificates installed AND having Antivirus that automatically self-sign all certificates it finds in HTTPS responses then you need:
Get root certificate from your AV (I got mine with browser: open any https web-site, check it's certificate, go to Certification Path tab, click on Root certificate. Then click View certificate button, go to Details tab and click Copy to File... button. Default settings are fine for saving certificate in *.cer file).
Convert *.cer to *.crt. You can use Cygwin's OpenSSL with the following command:
openssl x509 -inform DER -in <your *.cer certificate file> -out <new cert>.crt
Move new *.crt file to ca-directory (in my case it was /etc/pki/tls/certs/).
That was enough for me to get wget working.
If you are using windows just go to control panel, click on automatic updates then click on Windows Update Web Site link. Just follow the step. At least this works for me, no more certificates issue i.e whenever I go to https://www.dropbox.com as before.
Just do
apt-get install ca-certificate