Posts | Tags | Archive

Setting up TortiseHg on Windows

TortiseHg can be a bit of a pain to set up if you don't want to have peagent running in the background all the time for authentication. This method uses TortisePlink (comes with the install) for authentication, and runs it only when it needs to authenticate.

Generating a public/private key pair

  1. Download PuTTYgen and run it.
  2. Generate the key pair by clicking the generate button.
  3. Optionally, enter a passphrase to protect the private key.
  4. Save the public and private keys somewhere. I prefer to save them as id_rsa.pub and id_rsa.ppk in C:/Users/[username]/.ssh/ but it doesn't really matter.

Setting up TortiseHg

  1. Download TortiseHg and install it.
  2. When installing, make sure that SSH Utils are installed.
  3. When it finishes installing, run the program (it'll be called "TortiseHg Workbench" in the start menu).
  4. Configure the settings as you see fit. This will generate a configuration file at C:/Users/[username]/mercurial.ini.
  5. Close the program and open up mercurial.ini in a text editor.
  6. Under the "[ui]" section (if it doesn't exist, create it) add/edit two entries (adjusting for your own custom settings):
1
2
username = [name] <[email]@[domain]>
ssh = "C:\\Program Files\\TortoiseHg\\TortoisePlink.exe" -i "C:\\Users\\[username]\\.ssh\\id_rsa.ppk"

Now all that's needed is to upload the generated public key to the server(s) you wish to pull from or push to.

When asked, just open the key up in a text editor (make sure it's the public key, NEVER share your private key) and copy-paste the text.

After configuring this, you'll be able to push to repositories on the servers you give your public key to, without having to enter your password every time.


Sending a file via a P2P connection in a web browser

Sharefest is a site that allows users to send files of arbitrary size via a P2P connection. To use it, go to the site, select a file to share, then give the link to friend. All they have to do is visit the URL and they'll be able to download the file you shared.

This transfer is directly from your computer to theirs, without the file being uploaded anywhere between. This also makes it easy to stop sharing the file. Just close the browser window and the file becomes inaccessable.

Sharefest is open-source! Check out the code on GitHub.


Backup/Restore a Gmail account

Gmvault is an open source project that allows users to download all of their emails, as well as the labels.

From there it's as simple as opening them up in a program like Outlook or Thunderbird to view them. It also includes an option to restore the emails.

Most email clients have the capability of doing this, but this was by far the quickest way. Automatic incremental backups can also be done by running a 'quick sync' regularly.

© Carey Metcalfe. Built using Pelican. Theme is subtle by Carey Metcalfe. Based on svbhack by Giulio Fidente.