Import existing Mercurial repository over SSH (BB-2603)

Issue #3026 closed
aragost Trifork
created an issue

A colleague of mine tried to import an existing Mercurial repository today. He entered a SSH URL and gave the username and password...

This didn't work and I remembered that this must be because Bitbucket has no way of supplying the password to SSH (short of posing as a TTY and what not).

So I suggest that you discover this when the form is submitted and give a proper error message.

Additionally: can I enter a local filesystem URL (local on Bitbucket's servers!) and import code from a private repository? Please check this too! :-)

Comments (4)

  1. Dylan Etkin


    When I try to enter a URL that starts with ssh: I get an error message saying:

    "Not a valid URL"

    This seems correct for me.

    You don't need to worry about the local url's as we only allow http, https and svn as valid url schemes.

    Let me know if I am misunderstanding the error condition you are seeing with ssh.



  2. Martin Geisler

    Hi Dylan,

    I'm glad to hear you thought of the problems with importing using a local path. Does that include file:// URLs?

    What I meant is that "Not a valid URL" is wrong since my poor colleague copied it directly from his .hg/hgrc file. That is, the URL is valid and normal Mercurial will happily clone from it.

    So there are two things here: saying the URL is invalid when it's not really invalid, and offering the user to input username and passwords when they can never work. It's not obvious to most users that the import page cannot import from a repository hosted with SSH, especially when that support is part of Mercurial itself.

  3. Dylan Etkin
    • changed status to new

    Thanks, that clears it up. The error message could certainly be clearer and the username/password can be a bit confusing. I have added this issue to the backlog, cheers.

  4. Log in to comment