git clone --bare: 致命:存储库不存在 [英] git clone --bare: fatal: repository does not exist

查看:63
本文介绍了git clone --bare: 致命:存储库不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 debian Wheezy 上使用 git 版本 1.7.10.4.

I am using git version 1.7.10.4 on debian Wheezy.

我正在尝试创建一个新的存储库(根据 git-scm.com)但是每次我收到这个致命错误时:

I am trying to create a new repository (according to the 'manual of git-scm.com) However everytime I get this fatal error:

fatal: repository 'poekoe' does not exist

这就是我在命令行输入的内容:

So this is what I type at command line:

git clone --bare --progress poekoe poekoe.git

我也在一个 sqeeze 发行版上试过这个,它工作得很好.(squeeze 上的 git 版本为:git version 1.7.2.5)

I also tried this on a sqeeze distribution and there it works fine. (git version on squeeze is: git version 1.7.2.5)

wheezy 发行版上所有已安装的软件包是:

All installed packages on the wheezy distribution are:

libcurl4-gnutls-dev
libexpat1-dev
gettext
vim
libz-dev
libssl-dev
git

一切都是为了让它工作.

all to get this working.

有人知道如何解决这个问题吗?我以 root 身份运行脚本

Does anybody know how to fix this? I am running the script as root

推荐答案

git clone --bare --progress poekoe poekoe.git

git clone 仅适用于您当前的目录确实包含 repo poekoe.

如果您当前的文件夹为空,则错误消息是有意义的.

If your current folder is empty, then the error message makes sense.

URLs 部分建议使用绝对路径:

$ git clone --bare -l /home/proj/.git /pub/scm/proj.git


OP Bonifatiusk 报告 在评论中根据git版本的解决方案:


The OP Bonifatiusk reports in the comments a solution depending on git version:

我发现了这个:

git --bare init poekoe.git:这确实与旧版本不同,旧版本将使用 --bare 和克隆来初始化新的 repo.

git --bare init poekoe.git: this is indeed different from older versions who will init a new repo using --bare with clone.

这篇关于git clone --bare: 致命:存储库不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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