从Git Bash终端创建新的回购Bitbucket? [英] Create new repo on Bitbucket from Git Bash terminal?

查看:101
本文介绍了从Git Bash终端创建新的回购Bitbucket?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用命令行Git在Bitbucket中创建新的存储库?我试过以下内容:

  git clone --bare https://username@bitbucket.org/username/new_project.git 

我收到以下消息:


克隆到裸存储库'new_project.git'... ...
致命: https://username@bitbucket.org/username/new_project.git/info / refs not found:你是否在服务器上运行git update-server-info?


不用转到网络应用程序就可以做到这一点。

解决方案

您可以使用Bitbucket REST API和cURL。例如:

  curl  - 用户登录名:pass https://api.bitbucket.org/1.0/repositories/ \ 
--data name = REPO_NAME

创建名为的新存储库, REPO_NAME



请参阅使用Bitbucket REST API 获取更多信息。

更新



有关Bitbucket V2的具体信息,请参见 POST一个新的回购协议


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/username/new_project.git

I get this message:

Cloning into bare repository 'new_project.git'...
fatal: https://username@bitbucket.org/username/new_project.git/info/refs 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.

解决方案

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

curl --user login:pass https://api.bitbucket.org/1.0/repositories/ \
--data name=REPO_NAME

to create new repository named REPO_NAME.

See Use the Bitbucket REST APIs for more information.

UPDATE

For Bitbucket V2 specifically, see POST a new repo

这篇关于从Git Bash终端创建新的回购Bitbucket?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆