Steps to reproduce:
- Create a repository
- Go to the "URIs" section of the repositories
- Add a ssh Github URL and set it to Mirror mode
- When prompted for a credential, create a new one - enter your github ssh key
- Push some commits to the repo in your Phabricator instance
- 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:
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)