arc install-certificate failure

when I try to install “arc” following the “quick-start”(◉ Arcanist Quick Start)
everything is fine, but when I try to install-certificate I got stuck.
It gives me the following message.

When I add the “–trace” options, I got the following error message:

**yaozhongxiao@n13-022-168** : **~/workspace/compiler/llvm-project** $ arc install-certificate --trace **ARGV** /home/tiger/workspace/dev-utils/arcanist/bin/arc install-certificate --trace >>> [1] (+0) <exec> $ php -f /data00/workspace/dev-utils/arcanist/scripts/arcanist.php -- install-certificate --trace **ARGV** /data00/workspace/dev-utils/arcanist/scripts/arcanist.php install-certificate --trace **LOAD** Loaded "arcanist" from "/data00/workspace/dev-utils/arcanist/src". Config: Did not find user configuration at "/home/tiger/.arcrc". Config: Did not find system configuration at "/etc/arcconfig". Working Copy: Reading .arcconfig from "/data00/workspace/compiler/llvm-project/.arcconfig". Working Copy: Path "/data00/workspace/compiler/llvm-project" is part of `git` working copy "/data00/workspace/compiler/llvm-project". Working Copy: Project root is at "/data00/workspace/compiler/llvm-project". Config: Did not find local configuration at "/data00/workspace/compiler/llvm-project/.git/arc/config". **CONNECT** Connecting to "[https://reviews.llvm.org/api/](https://reviews.llvm.org/api/)"... >>> [1] (+0) <http> https://[reviews.llvm.org](http://reviews.llvm.org)/api/conduit.ping <<< [1] (+1,247) <http> 1,247,524 us **Usage Exception:** Failed to connect to server (https://[reviews.llvm.org](http://reviews.llvm.org)/api/): Host returned HTTP/200, but invalid JSON data in response to a Conduit method call. [2021-09-19 03:46:04] EXCEPTION: (ArcanistUsageException) Failed to connect to server (https://[reviews.llvm.org](http://reviews.llvm.org)/api/): Host returned HTTP/200, but invalid JSON data in response to a Conduit method call. at [<arcanist>/src/workflow/ArcanistInstallCertificateWorkflow.php:69] arcanist(head=master, ref.master=a028291f8e5e) #0 ArcanistInstallCertificateWorkflow::run() called at [<arcanist>/scripts/arcanist.php:419] <<< [1] (+1,325) <exec> 1,325,134 us

After checking the source code, it seems likes “conduit.ping” method failed,
but I can not get any other clues now.

50 public function run() { 51 $console = PhutilConsole::getConsole(); 52 53 $uri = $this->determineConduitURI(); 54 $this->setConduitURI($uri); 55 $configuration_manager = $this->getConfigurationManager(); 56 57 $config = $configuration_manager->readUserConfigurationFile(); 58 59 $this->writeInfo( 60 pht('CONNECT'), 61 pht( 62 'Connecting to "%s"...', 63 $uri)); 64 65 $conduit = $this->establishConduit()->getConduit(); 66 try { 67 $conduit->callMethodSynchronous('conduit.ping', array()); 68 } catch (Exception $ex) { 69 throw new ArcanistUsageException( 70 pht( 71 'Failed to connect to server (%s): %s', 72 $uri, 73 $ex->getMessage())); 74 } 75

yao zhongxiao <zhongxiao.yzx@gmail.com> 于2021年9月18日周六 下午9:26写道:

Hello,

Maybe logon to the web interface first, then visit https://reviews.llvm.org/conduit/login/.
You will get a page with a string beginning with “cli-”.

Create ~/.arcrc like this:

{
"hosts": {
"[https://reviews.llvm.org/api/](https://reviews.llvm.org/api/)": {
"token": "cli-<rest of your token here>"
}
}
}

Then proceed as if you’ve completed the “install-certificate” step. I hope this helps.

– HT

Hmm… it’s only generating a token with 1 hour of validity for me. Not sure if there’s a way to get a token that lasts longer.

– HT

Does `curl https://reviews.llvm.org/api/conduit.ping` work for you?
It should look like this:

$ curl https://reviews.llvm.org/api/conduit.ping
{"result":"llvm-reviews","error_code":null,"error_info":null}