Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
555 views
in Technique[技术] by (71.8m points)

debian - git clone --bare: fatal: repository does not exist

I am using git version 1.7.10.4 on debian Wheezy.

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

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

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.

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
git clone --bare --progress poekoe poekoe.git

That git clone only works if your current directory does contain the repo poekoe.

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

The URLs section recommends using absolute paths:

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

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

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...