Upcoming pastebinit 1.3 release

Every year, I try to set a few hours aside to work on one of my upstream projects, pastebinit.

This is one of these projects which mostly “just works” with quite a lot of users and quite a few of them sending merge proposals and fixes in bug reports.

I’m planning on uploading pastebinit 1.3 right before Feature Freeze, either on Wednesday or early Thursday, delaying the release as much as possible to get a few last translations in.

If you speak any language other than English, please go to:

Any help getting this as well translated as possible would be appreciated, for Ubuntu users, you’ll have to deal with it for the next 5 years, so it’s kind of important 🙂

Now the changes, they’re pretty minimal but still will make some people happy I’m sure:

  • Finally merged pbget/pbput/pbputs from Dustin Kirkland, these 3 tools let you securely push and retrieve files using a pastebin. It’s using a mix of base64, tar and gpg as well as some wget and parsing to retrieve the data.
    These are nice scripts to use with pastebinit, though please don’t send huge files to the pastebins, they really aren’t meant for that 😉
  • Removed stikked.com from the supported pastebins as it’s apparently dead.
  • Now the new pastebins:
  • paste.debian.net should now work fine with the ‘-f’ (format) option, thanks for their work on making their form pastebinit-friendly.
  • pastebinit should now load pastebin definition files properly from multiple locations.
    Starting with /usr/share/pastebin.d, then going through /etc/pastebin.d, /usr/local/etc/pastebin.d, ~/.pastebin.d and finally <wherever pastebinit is>/.pastebin.d
  • A few other minor improvements and fixes merged by Rolf Leggewie over the last year or so, thanks again for taking care of these!

Testing of the current trunk before release would also be greatly appreciate, you can get the code with: bzr branch lp:pastebinit

Bug reports are welcome at: https://launchpad.net/pastebinit/+filebug

About Stéphane Graber

Project leader of Linux Containers, Linux hacker, Ubuntu core developer, conference organizer and speaker.
This entry was posted in Canonical voices, pastebinit, Planet Ubuntu. Bookmark the permalink.

4 Responses to Upcoming pastebinit 1.3 release

  1. evotech says:


    loved your script, just one issue.

    I made a link to pastebinit with ln to my /usr/local/bin/
    But when i run the script from ther ei get this error

    “Unknown website, please post a bugreport to request this pastebin to be added (http://pastebin.com)”

    I’m sure it is something easy, but i am not that versed with python, i tried to look at it but i could make nothing of it.

    Hopefully you can either look at it, or tell me what i should do instead, to make this script be runnable form anywhere


    1. It sounds like you should also link pastebin.d to /usr/local/etc/pastebin.d otherwise pastebinit can’t find the pastebin defintion files.

      1. evotech says:

        That did the trick!

        Thanks again.

  2. garfield says:


    i’ve been using your pastebinit for some years now, and it always worked without any problems. today i encountered a problem while trying to send a paste from an ipv6 only system.

    – ipv6 machine with no ipv4 connection.
    – gateway service of sixxs.org (https://www.sixxs.net/tools/gateway/)
    – copied the pastebin.d/paste.ubuntu.com.conf to pastebin.d/paste.ubuntu.com.sixxs.org.conf and changed the urls inside to contain the “.sixxs.org” suffix.

    test: echo “testpaste” | pastebinit -a garfield -f text -b “http://paste.ubuntu.com.sixxs.org”

    result: http://paste.ubuntu.com.sixxs.org/
    expected result: http://paste.ubuntu.com.sixxs.org/6691157/

    upon further investigation, i’ve found out that the sixxs.org gateway response throws a 405.

    problem: the sixxs.org gateway rejects the default urllib User-Agent header.
    solution: add a “normal” UA (took the one from chrome)

    — /a/pastebinit 2014-01-04 15:49:30.000000000 +0100
    +++ /b/pastebinit 2014-01-04 15:35:47.000000000 +0100
    @@ -50,4 +50,5 @@
    # Custom urlopener to handle 401’s
    class pasteURLopener(urllib.FancyURLopener):
    + version = “Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36”
    def http_error_401(self, url, fp, errcode, errmsg, headers, data=None):
    return None

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.