Git clone localhost?

I'm not big on ubuntu, but I managed to configure git on my client and gitosis on the server I'm proud of. I added my local ssh public key to the authorized keys for gitosos and can clone, push, commit, etc. Everything works fine, from my local machine to the server - back and forth.

However, since the server also serves as my web server, I just need to connect to the server and make "git clone git @localhost: gitproject.git" in one of my webroot folders, but it just doesn’t work.

Should I add a server pub key to authorized hosts? And if so, how? Or is there any other way to do this?

thanks

+7
source share
2 answers

If the server has a shell, simply do:

  $ cd / path / to / webroot / directory
 $ git clone / path / to / git-repo
+17
source

What is errormessage?

try to run

git clone --verbose git@localhost :gitproject.git 

for more information

+2
source

All Articles