Page MenuHomePhabricator

It's not clear that SSH keys for mirroring repositories should have Conduit access enabled
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Create a repository
  2. Go to the "URIs" section of the repositories
  3. Add a ssh Github URL and set it to Mirror mode
  4. When prompted for a credential, create a new one - enter your github ssh key
  5. Push some commits to the repo in your Phabricator instance
  6. See that your commits have not been mirrored to Github

phd logs say:

  #2 PhabricatorRepositoryPullLocalDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:181]
  #3 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:131]
[2017-03-30 20:01:24] PHLOG: 'Unexpected output while updating repository "rRS": [2017-03-30 20:01:24] EXCEPTION: (PhutilProxyException) Error while pushing "rRS" repository to mirrors. {>} (PhutilAggregateException) Exceptions occurred while mirroring the "rRS" repository.
    - CommandException: Command failed with error #128!
      COMMAND
      git push --verbose --mirror -- '********'
      
      STDOUT
      (empty)
      
      STDERR
      Pushing to git@github.com:username/repo.git
      Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
      Permission denied (publickey).
      fatal: Could not read from remote repository.
      
      Please make sure you have the correct access rights
      and the repository exists.

Through trial and error, I realized that I have to go to Passphrase and manually enable Conduit access to that key - only then did the Mirroring functionality work. But Conduit Access was not part of the gui for creating a credential:

Screenshot_2017-03-30_22-13-18.png (774×618 px, 39 KB)

So by going through all the steps presented by the main gui I ended up with a non-working solution, fixed only by stubborn trial/error.

Version information

phabricator
    bee043b1636269316886b4de954ea185cd59cbc8 (Jan 27 2017) 
arcanist
    ade25facfdf22aed1c1e20fed3e58e60c0be3c2b (Jan 5 2017) 
phutil
    9d85dfab0f532d50c2343719e92d574a4827341b (Jan 13 2017)

Event Timeline

I can't reproduce this. We mirror from this install without Conduit access enabled, and there is no conceivable reason that Conduit access should need to be enabled for this to work.

Screen Shot 2017-03-30 at 1.35.06 PM.png (1×1 px, 212 KB)

Nothing on the mirror pathway calls getAllowConduit().

I suspect this is a coincidence that you've misattributed to an unrelated change? If you revoke Conduit access, does mirroring fail?

Yes, after revoking Conduit Access the mirror still works. It's weird... There must've been some other reason why Github rejected my key, unrelated to Conduit.

Thank you for your assistance.

epriestley claimed this task.