Hey Christoph, thanks a lot for using my command!
I often face the same issue, and in my case this is due to my Institution’s proxy. The problem seems to lie in the fact that the proxy uses a proprietary https certificate that is not recognised by the java https library used by Stata to connect to secure sites. Not sure this is the same issue that is affecting you, but here are a couple of solutions that worked for me.
One possibility could be to add the certificate to the Stata java path. To identify the certificate, open a mock page on the dbnomics website (e.g. https://api.db.nomics.world/v21/providers), see what secure certificate the browser is using and export it. You might need to convert the exported certificate to a .pem certificate file (or not).
Follow the procedure below to install the certificate (sent to me by the Stata tech support team):
We need to copy the certificate file to the “lib\security” folder in your Java directory found under the official Stata installation folder. For the instructions below I will use the fake certificate file name “fakecert.cer”, you will need to perform the steps and substitute the correct cert file name. On Windows you will need to have Administrator access to perform these tasks.
Note that on Windows there are two Java directories windows-i586 and windows-x64.
If you are using 64bit Stata choose the windows-x64 directory, otherwise choose the windows-i586 directory for 32-bit Stata. You can type:
in Stata to determine whether you are running 64 or 32 bit. The example below assumes you are on a 64-bit Stata 14. The java folder will look like:
C:\Program Files (x86)\Stata14\utilities\java\windows-x64\jre1.8.0_121\lib\security
Copy the “fakecert.cer” file in this directory. To import the certificate we will need to open a command terminal and run it as administrator. On a Windows 10 machine you can type:
into the search bar next to the Windows start button. Next right click on the best match and select “run as administrator”. Now navigate the directory where you copied the certificate file. On Windows the command you type in the terminal should be:
cd C:\Program Files (x86)\Stata14\utilities\java\windows-x64\jre1.8.0_121\lib\security
We can now execute the following command to register the certificate:
"C:\Program Files (x86)\Stata14\utilities\java\windows-x64\jre1.8.0_121\bin\keytool" -keystore cacerts -importcert -file "fakecert.cer"
It will ask you for a password which by default is:
Then you will need to type:
yes to the prompt below
Trust this certificate? [no]:
Finally close Stata, launch a fresh copy and test it with an HTTPS link.
Second option, and if you are comfortable with the lost secure connection, I could advise to change the main API endpoint in my ado-file. Replace the URL in line 42 with the following: http://api.db.nomics.world/v21. It should now work with or without your institution’s proxy (at the cost of the lack of secure data transfer).
Hope this helps.