Patrick Patrick - 1 year ago 160
Git Question

Create new repo on Bitbucket from Git Bash terminal?

Is it possible to create a new repository in Bitbucket by using command line Git? I have tried the following:

git clone --bare

I get this message:

Cloning into bare repository 'new_project.git'...

not found: did you run git update-server-info on the server?

It would be nice to do this without going to the web app.

Answer Source

You can use the Bitbucket REST API and cURL. For example:

curl --user login:pass \
--data name=REPO_NAME

to create new repository named REPO_NAME.

See Use the Bitbucket REST APIs for more information.


For Bitbucket V2 specifically, see POST a new repo

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download