I need to work with a git repo that was set up in a remote machine in my company to which I have access via ssh with my company’s login. I can sudo on the remote machine.
After reading some git tutorial I see I should clone the repo locally and so I tried:
me$ git clone git://remote.company.com/git/tools/thing.git
Cloning into thing...
remote.company.com[0: 1.2.3.4]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
me$ git clone http://remote.company.com/git/tools/thing.git
Cloning into thing...
fatal: http://remote.company.com/git/tools/thing.git/info/refs not found: did you run git update-server-info on the server?
So I switched back to the remote machine and tried:
me@remote:/home/git/tools/thing.git$ git update-server-info
error: unable to update ./info/refs+
error: cannot open ./objects/info/packs+
me@remote:/home/git/tools/thing.git$ sudo git update-server-info
[sudo] password for me:
me@remote:/home/git/tools/thing.git$
Not much success!
Am I doing something conceptually wrong in beginning to work with this repo? FYI, I was thinking to create an actual remote branch for some new functionalities and to work from there.
UPDATE 1:
me$ git clone ssh://git@remote.company.com/tools/thing.git
Cloning into thing...
fatal: '/tools/thing.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Tried the same thing without git@, with various permutations of folders and .git extensions.
Nothing works.
UPDATE 2:
Ok, found it.. 🙂 git clone git@remote.company.com:tools/thing
Here it is:
git clone git@remote.company.com:tools/thingThanks to all!