- git bare repository '/opt/games.git' not found on Storage Server or its not a bare repository

why do I always get this error even if I initialize the git repo with the command
git init --bare inside natasha storage server

This is how I did it. I run the code below without creating the directory for the repo. Git created it automatically.

cd /opt/ && git init --bare beta.git

1 Like

Hi @owusukd / @Sovan-Keshri
I’m too getting this issue and the “git init --bare ” did not resolve it.

My requirement was to clone the repo from /opt/demo.git into /usr/src/kodekloudrepos directory without making any changes to the repository in storage server ststor01.

I tried all the below ways separately after ssh into ststor01 server and still it did not work. Can you please comment?

Trial 1:
cd /usr/src/kodekloudrepos
git init --bare demo.git

Trial 2:
git clone /opt/demo.git /usr/src/kodekloudrepos

Trial 3:
git clone /opt/demo.git /usr/src/kodekloudrepos/demo.git

Trial 4:
git clone --bare /opt/demo.git /usr/src/kodekloudrepos/demo.git

Trial 5:
cp -rf /opt/demo.git /usr/src/kodekloudrepos/

Looks like 6th time’s a charm. It worked with below command line. :smile:

Trial 6: (IT WORKS!!!)

git clone /opt/demo.git /usr/src/kodekloudrepos/demo

I am facing the same issue . Did anyone find the root cause of this ?

@mmumshad

  • –bare command as solved tis issue . An bare repo… thanks @owusukd