Support for Mercurial subrepos in Pipelines

Issue #13146 open
Karl Trygve Kalleberg created an issue

Currently, Pipelines fails when it is applied to a Mercurial repo that depends on subrepos which are cloned over SSH.


I have a simple Mecurial repository A that relies on Mercurial repository B. A contains a .hgsub file with a line on the following form:

B = ssh://

When using Pipelines to build repo A, the build stops on checkout, complaining about ssh not being found:

+ hg clone -r "42e8c457a6cabf66c55b8e9a864620903d46ddf1" https://x-token-auth:$ .
adding changesets
adding manifests
adding file changes
added 5 changesets with 7 changes to 4 files
updating to branch default
remote: /bin/sh: 
remote: ssh: not found
abort: no suitable response from remote hg!

The atlassian/agent-setup-hg:latest image appears to contain the machinery used for the checkout/cloning stage. As you appear to only clone Mercurial repos over HTTPS, the "missing" ssh isn't really a surprise...


Pipelines appears to be very much tied to Bitbucket, so don't expect you to fetch "foreign" repos hosted elsewhere as part of my build. Hence, I'm not asking for a full SSH-keys solution, as is common with other CI services. Just something that works internally with Bitbucket would be acceptable.

That being said, what I'm really after is a way to compose a Pipelines build out of several Mercurial repos, all hosted on Bitbucket; another mechanism than Mercurial subrepos would do fine, as well.

Comments (7)

  1. Matt Ryall

    Thanks for raising the issue. As you say, our setup-hg image doesn't have SSH support for hg subrepos and we would also need to inject keys to support this use case.

    We don't have plans to address this limitation in the next six months, but will keep this issue open to monitor interest from the community.

  2. Nigel Whitaker

    In our case the subrepos are on bitbucket and are a mixture of hg and git so our .hgsub has lines like this:


    and I'll echo Karl's request for something that works 'internally' first using the exist keys perhaps just by adding the ssh executable to the image?

  3. Jonathan L

    Whats the timeline for https support at the least? We have mercurial https subrepos



    abort: http authorization required for
  4. Log in to comment