tags:

views:

30

answers:

1

Hello All,

I am trying to host a git repository. I am now able to clone git repo on any machine within the network with:

git clone [email protected]:/home/gituser/repositories/gitosis-admin.git

But I need to give absolute path of the repo location.

Is it possible to clone without specifying repo path? like for e.g.

git clone [email protected]:gitosis-admin.git

Thanks in advance,

+1  A: 

You should be able to clone using a path relative to your home directory on the remote machine. So, for example, git clone [email protected]:/home/gituser/repositories/gitosis-admin.git could become git clone [email protected]:repositories/gitosis-admin.git.

Joseph Spiros
Thanks Joseph!!!But there is no way to avoid specifying "repositories" as well?
Vaman Kulkarni
I found a workaround like I created a softlink in / to ~/repositoris/gitosis-admin.git and now it works with git clone [email protected]:/gitosis-admin.git command. Thanks
Vaman Kulkarni
I'd recommend doing a softlink in ~ to ~/repositories/gitosis-admin.git, so that you can do `git clone [email protected]:gitosis-admin.git`. The problem with linking in / is that it pollutes the root on a system that may have multiple users (and that's why you have a home directory in the first place).
Joseph Spiros
Thanks Joseph for your suggestion.
Vaman Kulkarni