Is it possible to create a new repository in Bitbucket by using command line Git? I have tried the following:
git clone --bare https://username@bitbucket.org
The top answer with cURL wasn't working well for me, so I ended up doing it in Python with Bitbucket-API. Here's the documentation on the repository.create() call.
Install:
pip install bitbucket-api
Python:
>>> from bitbucket.bitbucket import Bitbucket
>>> bb = Bitbucket(username, password)
>>> bb.repository.create('awesome-repo', scm='git', private=True)
(True, {u'scm': ...})