user3637971
user3637971

Reputation: 315

I can't clone my repository in my own git server

I can't clone my repository

I'll explain the steps what I've done
1) I'm using windows 8
2) Run Git Bash
3) $mkdir git_ball
4) $cd git_ball
5) $git init, returns Initialized empty Git repository in c:/Users/user1/git_ball/.git/
6) $ls > list.txt
7) $git add .
8) $git commit -m 'creation of list.txt'
9) $git config push.default matching
10) $git remote add origin /c/Users/user1/git_ball
11) $git config http.sslVerify "false"
12) $git push origin, it gives: everithing up-to-date
13) $cd ..
14) $git clone git://192.168.48.189/~/git_ball git_ball2 , (192.168.48.189 is the IP of my local machine)
it gives: Cloning into 'git_ball2'... fatal: unable to connect to 192.168.48.189: 192.168.48.189[0: 192.168.48.189]: errno=No such file or directory

I don't know what is missing, I want to clone git_ball using my IP, can you help me about this case. The idea also is cloning git_ball from another PC into the same LAN network using my IP.

Thanks

Upvotes: 1

Views: 1497

Answers (1)

ThanksForAllTheFish
ThanksForAllTheFish

Reputation: 7251

You missed to configure a remote repository. Have a look at this link: http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push/. It is for Linux, but it seems you are using git bash so it should work.

Basically, you have to configure two repository on your local machine: the remote and the local repo. To configure the remote repository:

  1. mkdir remote-repo.git
  2. cd remote-repo.git
  3. git init --bare

At this point, you can repeat your procedure to create a local repository, where at point 10 you set the remote to point at remote-repo.git.

Upvotes: 1

Related Questions