Cloning an observed repository

I’ve set up a Phabricator repo to Observe one of our standalone Mercurial repos. It now has two active URIs:

https://sources.local/hg/repo           | Observe   | Hidden
ssh://vcs@phabricator.local/source/repo | Read Only | Visible

The repo has been since fully imported by Phabricator and is displayed correctly. However, when I try to clone it from the Visible URI, hg says:

remote: Exception: This repository is read-only over SSH.
abort: unexpected response: empty string

Is this an expected behavior, or did I misconfigure something?

This is not expected.

When we receive a VCS request, we first determine if it is read-only or read-write, so we can apply the appropriate permissions checks (e.g., require “Pushable By” permission for writes) and route the request appropriately (e.g., to a writable node in a clustered environment).

In git, determining whether a request is read-only or read-write is straightforward, since git runs different top-level commands for read workflows and write workflows. In svn and hg, we must parse more of the protocol to distinguish between read operations and write operations.

This error may indicate that we’re identifying the request as a read-write request when it’s really a read-only request. We assume new types of protocol frames are read-write, so this can happen when the hg protocol changes and we haven’t added new commands to the list of read-only commands yet.

That said, I can’t immediately reproduce this:

Here’s what happens when I clone it:

$ hg clone ssh:// hg-test-2
requesting all changes
adding changesets
adding manifests
adding file changes
added 3 changesets with 2 changes to 2 files
new changesets e800273ae053:aaefbe96a5bb
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

I’m using this version of Mercurial:

$ hg --version
Mercurial Distributed SCM (version 4.7)
(see for more information)

Copyright (C) 2005-2018 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO

Version information about your copy of hg may be helpful in reproducing this.

$ hg --version
Mercurial Distributed SCM (version 5.0.1)

My colleague uses 4.8.1 and gets the same error.

Our Phabricator isn’t exactly crispy fresh, so this might be an issue too:

    edda40aa3b931ed064c52536af5b65fd6611e841 (Apr 23 2019) (branched from 02cfcfa0796993e078c8cb632a9df39ef7227e46 on origin) 
    4d22e0f89f10b8a7f47f6ee615e0ccf0f354e582 (Mar 8 2019) (branched from 9830c9316d38988b2dc283ac1a124b73bc8e6c5f on origin) 
    3e6a9946bcfc39591dbd9a571d1f56c8c27d4a0a (Apr 18 2019) (branched from 639e4b9cae284717b1ed717dd1e4d11c70744b86 on origin) 
php    5.4.16 
diff    3.3 at /usr/bin/diff 
git at /usr/bin/git 
hg    3.9.2 at /usr/bin/hg 
pygmentize    2.3.1 at /usr/bin/pygmentize