[英]git clone --bare: fatal: repository does not exist
I am using git version 1.7.10.4 on debian Wheezy. 我在debian Wheezy上使用git版本1.7.10.4。
I am trying to create a new repository (according to the 'manual of git-scm.com ) However everytime I get this fatal error: 我正在尝试创建一个新的存储库(根据' git-scm.com的手册)但是每次我都会遇到这个致命的错误:
fatal: repository 'poekoe' does not exist
So this is what I type at command line: 这就是我在命令行输入的内容:
git clone --bare --progress poekoe poekoe.git
I also tried this on a sqeeze distribution and there it works fine. 我也在sqeeze发行版上试过这个,它运行正常。 (git version on squeeze is: git version 1.7.2.5)
(挤压的git版本是:git版本1.7.2.5)
All installed packages on the wheezy distribution are: wheezy发行版上的所有已安装软件包包括:
libcurl4-gnutls-dev
libexpat1-dev
gettext
vim
libz-dev
libssl-dev
git
all to get this working. 一切都是为了让这个工作。
Does anybody know how to fix this? 有人知道如何解决这个问题吗? I am running the script as root
我以root身份运行脚本
git clone --bare --progress poekoe poekoe.git
That git clone
only works if your current directory does contain the repo poekoe
. 只有当前目录包含repo
poekoe
git clone
才有效。
If your current folder is empty, then the error message makes sense. 如果您当前的文件夹为空,则错误消息是有意义的。
The URLs section recommends using absolute paths: URL部分建议使用绝对路径:
$ git clone --bare -l /home/proj/.git /pub/scm/proj.git
The OP Bonifatiusk reports in the comments a solution depending on git version: OP Bonifatiusk 在评论中报告了一个取决于git版本的解决方案:
I found this:
我找到了这个:
git --bare init poekoe.git
: this is indeed different from older versions who will init a new repo using--bare
with clone.git --bare init poekoe.git
:这确实与旧版本不同,旧版本将使用--bare
与clone创建一个新的repo。
Sharing for future readers... 分享给未来的读者......
One possibility can be access rights . 一种可能性是访问权限 。 Make sure that you have at least read access to your main repository which you're trying to interact with.
确保您至少具有对您尝试与之交互的主存储库的读取权限。
On web based git solutions such as Bucket and Hub , this issue is unlikely since access permissions is handled by them in many cases. 在基于Web的git解决方案(如Bucket和Hub)上 ,由于在许多情况下由它们处理访问权限,因此不太可能出现此问题。
you get this error(fatal: repository 'pekoe' does not exist) when you don't follow the steps properly in git. 当你没有在git中正确地执行这些步骤时,你得到这个错误(致命:存储库'pekoe'不存在)。
step-1:: install git and config with command step-1 ::使用命令安装git和config
git config --global user.name eg., mack09 git config --global email git config --global user.name eg。,mack09 git config --global email
step-2:: the go to Github website create a new repository step-3:: copy the address from right-hand side https://github.com/mack09/repo.git
step-2 ::转到Github网站创建一个新的存储库步骤3 ::从右侧复制地址
https://github.com/mack09/repo.git
step-4:: go to git bash or cmd , create a folder to store all your project do go to the folder you created and now you are in created folder. step-4 ::转到git bash或cmd,创建一个文件夹来存储你所有的项目,然后转到你创建的文件夹,现在你在创建的文件夹中。 step-5:: do this git clone https://github.com/mack09/repo.git step-6:: add heart.txt and
git commit-m " message"
and git push origin master. step-5 ::做这个git clone https://github.com/mack09/repo.git step-6 ::添加heart.txt和
git commit-m " message"
和git push origin master。 I tried this step it worked so try it and reply whatever the result. 我尝试了这个步骤,所以尝试它并回复任何结果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.