Bitbucket存储库

时间:2013-01-31 13:21:56

标签: git bitbucket

我创建了一个Bitbucket帐户,用于与朋友分享代码。当我尝试使用命令

克隆存储库时
$ git clone https://wallstrass@bitbucket.org/wallstrass/wall-strass.git
他们说:

$ git clone https://wallstrass@bitbucket.org/wallstrass/wall-strass.git
Cloning into 'wall-strass'...
fatal: https://wallstrass@bitbucket.org/wallstrass/wall-strass.git/info/refs not
found: did you run git update-server-info on the server?

我已尝试执行命令“git update-server-info”但它不起作用。我不知道该怎么做,请你有个想法吗?

[更新]以下是我的命令:

XXXX-PC /c/repos (master)
$ export http_proxy="http://XXXXX"

XXXX /c/repos (master)
$ export https_proxy="https://XXXXX"

XXXX /c/repos (master)
$ cd c:/repos

XXXX /c/repos (master)
$ git init
Reinitialized existing Git repository in c:/repos/.git/

XXXX /c/repos (master)
$ git remote add origin https://wallstrass@bitbucket.org/wallstrass/wall-strass
.git
fatal: remote origin already exists.

XXXX /c/repos (master)
$ echo "# This is my README" >> README.md

XXXX /c/repos (master)
$ git add README.md
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory.

XXXX /c/repos (master)
$ git commit -m "First commit. Adding a README."
# On branch master
nothing to commit (working directory clean)

XXXX /c/repos (master)
$ git push -u origin master
fatal: https://wallstrass@bitbucket.org/wallstrass/wall-strass.git/info/refs not
 found: did you run git update-server-info on the server?

3 个答案:

答案 0 :(得分:4)

如果你还没有推动任何东西,那就没有什么东西可以克隆了。

完成第一次提交后,将其推送到bitbucket,然后您就可以克隆存储库。

答案 1 :(得分:0)

听起来像HTTPS传输是以某种方式进行的。尝试使用ssh传输进行克隆:

git clone git@bitbucket.org:wallstrass/wall-strass.git

答案 2 :(得分:-1)