Skip to content

Comment on Back That Gmail Up

Comments

Instead of putting the password in as a plaintext argument, you can store it in the OS X keychain and access it with the command described here: http://www.maclovin.de/2010/02/access-os-x-keychain-from-ter...

I use this in my .zshrc to create Bitbucket repos on the fly:

  function bitbucket() {
    curl -X POST -u masnick:`security 2>&1 >/dev/null find-internet-password -gs masnick.bitbucket.org | cut -d '"' -f 2` https://api.bitbucket.org/1.0/repositories/ -d name=$@ -d scm=git -d is_private=True
  };
(Running "bitbucket newrepo" will create a new repo in my Bitbucket acct called "newrepo".)
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.