Create new repo on Bitbucket from Git Bash terminal?

前端 未结 7 1446
别那么骄傲
别那么骄傲 2020-12-22 19:56

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         


        
7条回答
  •  时光说笑
    2020-12-22 20:17

    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': ...})
    

提交回复
热议问题