How to start using "Phabricator" with already working "mercurial-server"?

I installed “Phabricator” for using it as GitHub alternative on my server. It’s purpose should be the web interface for my “hg” repositories where participants can manage their source codes and discuss problems. Am I right that “Phabricator” is capable of it?

So far, I have “Phabricator” running. I have my “Mercurial” repositories in “/var/lib/mercurial-server/repos/”. How can I connect “Phabricator” to these repositories? I’ve not found any easy-enough-read for doing that.

So far, these repositories are accessed using SSH-keys managed by “hgadmin”. Everybody involved can access the repos via command line. What’s missing is the discussion board as GitHub has for repos. This is why I was looking for a web interface and found “Phabricator”.

Have you seen ◉ Diffusion User Guide and ◉ Diffusion User Guide: Existing Repositories ? These articles directly answer your questions regarding existing repositories.
Phabricator can either host repositories (replace mercurial-server) or Observe them (work with an existing mercurial-server).

Phabricator is not a Github clone.
It uses different concepts and different workflows.
It is, however, fully-featured software-development suite.

It does allow for users to manage code repositories (although it might be harder to allow users to self-service that), and it does have Tasks feature, but the tasks are not scoped to a specific code repository (as they are in Github).
There are many, many other differences, so if you expect to have “just like Github”, you (and your users) would be disappointed.

I’ve seen the guide but it’s not comprehensive enough. What I did now was adding a URI for one of my hg repos. Diffusion, as I understand it’s part of Phabricator that deals with existing repos, complains about missing credentials. This is correct: without a valid public key, there’s no access to that repo. So I tried to set the credential and then, it asked for a private key. It shows that the user is hg which is correct but what’s meant by the private key? So far, I only added public keys to hgadmin. Why does it need a private key? And what private key? The one of the user hg? I have no idea where it is if it exists at all.

When Observing, Phabricator basically runs hg clone to get the repository’s content.
From the point of view of mercurial-server, Phabricator is just a user, so to log in to the system Phabricator needs a public/private key pair - just like a human user.
The public key would be added to mercurial-server as user credentials, and the private key stays in Phabricator for it to login.
It’s best practice to create a dedicated user in mercurial-server for Phabricator and a dedicate key-pair.

Somehow I managed to connect to two of my repos using Phabricator. For both, it shows:

Unhandled Exception (“RuntimeException”)

Undefined offset: 1

In the list, it shows three things: the repo, probably the last commit and the list of all commits. If I click to the last commit, it shows a comparison of two versions. Others just give that unhandled exception. How can I figure out what causes that exception and solve it?

There should be some more detailed exception stack-trace in your web server’s error log.

The web server hasn’t reported any error on this issue.