Overview

bbnew - create a new bitbucket repository

Original by Chip Camden January, 2011

Fork

This is my fork of the project, mainly to add git support and to redesign the idea to my liking.

Prerequisites

This depends on that you have RestClient installed,

$ gem install rest_client                                                 

or

$ git clone git://github.com/metamorfos/bbnew.git
$ cd bbnew
$ bundle install

Usage

To keep things short, To transform the curret folder to a repo

$ bbnew

Easy as that!

NOTE

You have to edit the variable bbrc in the script with the filepath to YOUR bbrc

The config file .bbrc MUST follow the same syntax as the example for the script to work properly. See bbrc.example for an example

Config Example

$ cat bbrc.example
username: "johndoe"
password: "verymuchasecret
scm: "git"
private_repos: "True"

About

This script creates a repository on bitbucket using the credentials stored in a file ~/.bbrc (which you should chmod 600 so nobody but root can read it). This file is expected to contain the bitbucket:

  • Username
  • Password
  • Prefered SCM (Source-Controll-Method in layman's terms method (hg or git)
  • If the repos should be created publicly or privately.

This information will only be used in the creation of the repository and then be left safe and sound in the warm womb of ~/.bbrc. An example file (bbrc.example) is provided in the repo.

The new repository will be created under the user's account. If successful, the repo will be created and a remote called bitbucket will be added