I have switched our internal codebase to use Mercurial, with a hosted remote repository. I've read that using Mercurial over SSH instead of HTTPS is faster because the data is compressed before it is sent. But... compared to HTTPS, it's quite a pain to set up, especially on Windows.
For those of you who have used both regularly on large projects...
Yes for a very large repository, it is recommended that you use SSH as Mercurial for large repo. Mercurial is able to compress data being sent for both ssh and https, so you can push and pull faster. Also, by default, Mercurial does not use compression when sending or retrieving data via SSH.You will need to enable it via configuration.
There are two ways you can do this:
In.hgrc
# Use compression
ssh = ssh -C
To specify it in your SSH config file, edit ~/.ssh/config
All said, HTTPS setup is easy. If you have it, just use it, unless you are going to write mega ton frameworks.
Either works just fine; go with whatever is easier for you.
HTTPS also does compression before encryption, so that's not much of an issue. The only real difference I've seen is that clones can abort for huge repos over HTTP, but folks can always re-try.
I personally like using https as a read-only setup so people can view/browse/clone, and then using ssh for all writing, and allowing clone/pull from ssh too.
Many folks start with ssh access because they already have UNIX user accounts for everyone, so there's no additional setup required.
If you already have https working for you, just stick with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With