1

I am completely new to git VCS. I managed to set up a local git repository in my computer. Instead of pushing all the code to github or related sites, I am planning to make my computer as a server. I have a couple of other machines too. I need to access /clone the local repo to these machines. What I have done till now:

  • installed apache http server
  • Created a git repo
  • Mapped the git repo to apache http by adding the entry to httpd.conf
  • I am able to access my git repo in my browser using :mycomputer.mydomain.com(i cannot disclose the name as i am in corporate network)
  • The url "mycomputer.mydomain.com" lists a folder 'XYZ' which is the folder in which i gave : git --bare init using the command line
  • Other people in my domain are also able to access the git repo through ip in their respective browsers

The issue is when I try to clone the repo using :

git clone mycomputer.mydomain.com

It says:

fatal repository 'mycomputer.mydomain.com' not found.

Am I missing something?

Parameswar
  • 1,951
  • 9
  • 34
  • 57

1 Answers1

1

I think you tried something like that:

git clone git://mycomputer.mydomain.com

And got:

Cloning into 'mycomputer.mydomain.com'...
fatal: Unable to look up  (port 9418) (Name or service not known)

That became therefore 'git clone' requires a remote git server installed on the mycomputer.mydomain.com pc, and monitoring the 9418 port. If you have no git server installed, you should install it, and then do a clone operation, or try to use another ways. The additional way to clone a repo is via ssh, like follows:

git clone git+ssh://user@mycomputer.mydomain.com/full/path/to/repo

Here you should specify full path to the remote repository resided on the 'mycomputer.mydomain.com' beginning of root folder, the 'user name is optional feature, and you should specify it only when you local user name differs to remote one. Example:

git clone git+ssh://sam@mycomputer.mydomain.com/home/sam/git/repo
Малъ Скрылевъ
  • 16,187
  • 5
  • 56
  • 69
  • i have a http server runing in the mycompuiter, i can access the repository in the browser i.e,i can access http://mycomputer.mydomain.com, what i am trying to do is, clone it from another machine.. – Parameswar Sep 25 '13 at 17:50
  • Also, could you tell what will be the path if i have my git repo in folder D:, will it be something http://mycomputer.mydomain.com/D/.. – Parameswar Sep 25 '13 at 17:51
  • I need to know OS that have run on the mycomputer.mydomain.com/ pc. It is windows, you'll have two ways to clone repo: 1. Install cygwin, then setup sshd service, then do 'git clone git+ssh://sam@mycomputer.mydomain.com/cygdrive/d/' 2. Install git-server for windows like this: gitstack. About it also see here: http://stackoverflow.com/questions/1482824/setup-a-git-server-with-msysgit-on-windows/8972911 – Малъ Скрылевъ Sep 26 '13 at 06:44