Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

debian

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

like image 553
BonifatiusK Avatar asked Oct 03 '13 09:10

BonifatiusK


People also ask

How do I fix fatal not a git repository or any of the parent directories?

For the second situation, you need to initialize the Git repository in your project folder. To do so, you need to navigate to the correct folder and then run the command git init , which will create a new empty Git repository or reinitialize an existing one.

Why is git repository not found?

Error: Repository not found. If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it.


2 Answers

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.

like image 173
VonC Avatar answered Oct 01 '22 15:10

VonC


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.

like image 34
xameeramir Avatar answered Oct 01 '22 14:10

xameeramir