crowdin-cli: crowdin upload initialization failure on Ubuntu 18.04

It shows an error

“Initialization Crowdin Cli failed. Please check your configuration file and credentials.”

when I run

crowdin upload -b test

crowdin.yml

"project_identifier" : MY_PROJECT
"api_key" : MY_API_KEY
"base_path" : ""

files: [
 {
  "source" : "/src/i18n/en.json",
  "translation" : "/src/i18n/%two_letters_code%.json"
 }
]

OS

Ubuntu 18.04 LTS (Bionic Beaver)

crowdin --version

Crowdin CLI version is 2.0.22

java -version

openjdk 10.0.1 2018-04-17 OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1) OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 9
  • Comments: 43 (15 by maintainers)

Most upvoted comments

Hi @Legion112 ,

I’ve already consulted with our devs and they have a few suggestions here, could you please try the following options on your side:

  1. Renew the certificate on your PC: the mentioned errors could be related to the old certificate version;
  2. Run the same CLI commands using another PC or laptop;
  3. Run the CLI from the same machine, but fully change the directory and path (as the example: run CLI from another local disk instead of the current one, because there is a chance it’s connected with disk permissions);
  4. Connect to another network and try to run the same command;

By the way, could you please also tell us if you’ve tried any option suggested in the following discussion thread? https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ

Looking forward to your reply,

Out of the blue, I got stuck with this again:

Initialization Crowdin Cli failed. Please check your configuration file and credentials.

A debug run (java -jar "/usr/lib/crowdin/crowdin-cli.jar" upload --debug) revealed:

com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Diving into the issue it turns out that Pihole is blocking api.crowdin.com:

Screen Shot 2020-01-24 at 05 14 36

So make sure to put it on your whitelist.