Page MenuHomePhabricator

arc hitting wrong url for conduit when not passed a full URI
Closed, ResolvedPublic

Description

If you leave off "http" or "https" from conduit, we guess the URI to be "ssh" instead of failing that the URI is missing a protocol. Possibly related to 8bb124c37de3

seth@dev2:~/tmp$ ./arcanist/bin/arc install-certificate 'secure.phabricator.com:8001/'
 CONNECT  Connecting to "secure.phabricator.com:/api/"...
LOGIN TO PHABRICATOR
Open this page in your browser and login to Phabricator if necessary:

secure.phabricator.com:/conduit/login/

Then paste the API Token on that page below.

    Paste API Token from that page: ^C

Event Timeline

sshannin created this task.Jun 28 2016, 3:02 AM
chad added a subscriber: chad.Jun 28 2016, 3:09 AM

Bug Reports require reproduction steps.

This comment was removed by sshannin.
sshannin added a comment.EditedJun 28 2016, 3:34 AM

Stock arcanist:

arc install-certificate 'secure.phabricator.com:8001/'
 CONNECT  Connecting to "secure.phabricator.com:/api/"...
LOGIN TO PHABRICATOR
Open this page in your browser and login to Phabricator if necessary:

secure.phabricator.com:/conduit/login/

Then paste the API Token on that page below.

    Paste API Token from that page: ^C
seth@fr-dev9:~$

As per title, the port does not seem to be getting passed through.

Let me know if you need any more reproduction steps.

I'm not sure what to do with your link. Here's what I can reproduce:

seth@dev2:~$ mkdir tmp && cd tmp
seth@dev2:~/tmp$ git clone -q https://github.com/phacility/libphutil.git
seth@dev2:~/tmp$ git clone -q https://github.com/phacility/arcanist.git
seth@dev2:~/tmp$ ./arcanist/bin/arc --version
arcanist 2374403e8f80a8fb16cdc1ce2843f932632e8cf0 (17 Jun 2016)
libphutil 5796beffff1653f312256c2788f02e37ffaa5126 (27 Jun 2016)
seth@dev2:~/tmp$ ./arcanist/bin/arc install-certificate 'secure.phabricator.com:8001/'
 CONNECT  Connecting to "secure.phabricator.com:/api/"...
LOGIN TO PHABRICATOR
Open this page in your browser and login to Phabricator if necessary:

secure.phabricator.com:/conduit/login/

Then paste the API Token on that page below.

    Paste API Token from that page: ^C
seth@dev2:~/tmp$
chad added a comment.Jun 28 2016, 3:51 AM

8bb124c37de3dfa29fcd23d4be53a5696b705c81 seems most likely root cause. I can trace it down to ssh coming in from getProtocol which should be blank and give you an error.

chad renamed this task from arc hitting wrong url for conduit when port in resource name after update to arc hitting wrong url for conduit when not passed a full RUI.Jun 28 2016, 8:13 PM
chad renamed this task from arc hitting wrong url for conduit when not passed a full RUI to arc hitting wrong url for conduit when not passed a full URI.Jun 28 2016, 8:16 PM
chad updated the task description. (Show Details)
chad added a subscriber: epriestley.

Thanks for such a quick response!

For reference, the instructions I've had for my new users for setting up their arc environment were to 'copy-paste the url from their browser'. Chrome at the very least does not display the 'http://' in this, so many people had configs that set with the config.default parameter without the scheme specified.

eadler added a comment.EditedJun 29 2016, 12:27 AM

ignore me - wrong install

FWIW, the answer to both of your questions before you edited it was yes :p