我无法在自己的git服务器上克隆我的存储库 [英] I can't clone my repository in my own git server

查看:126
本文介绍了我无法在自己的git服务器上克隆我的存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法克隆我的存储库

我将解释我已经完成的步骤

1)我正在使用windows 8

2)运行Git Bash

3)$ mkdir git_ball

4)$ cd git_ball

5)$ git init,返回在c:/Users/user1/git_ball/.git/

中初始化的空Git仓库$ ls> list.txt

7)$ git add。

8)$ git commit -m'创建list.txt'

9)$ git config push.default匹配

10)$ git remote add origin / c /用户/ user1 / git_ball

11)$ git config http.sslVerifyfalse

12)$ git push来源,它提供:heithing最新

13)$ cd ..

14)$ git clone git://192.168.48.189/~/git_ball git_ball2,(192.168.48.189是我本地机器的IP)

赋予:
克隆到'git_ball2'...
致命:无法连接到192.168.48.189:
192.168.48.189 [0:192.168.48.189]:errno =否这样的文件或目录

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

我不知道什么是缺少的,我想要clo使用我的IP使用git_ball,你能帮我解决这个问题吗?这个想法也是使用我的IP将git_ball从另一台PC克隆到同一个局域网中。

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

推荐答案

您错过了配置远程存储库。看看这个链接: http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push/ 。它适用于Linux,但似乎您使用的是 git bash ,所以它应该可以正常工作。

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

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

此时,您可以重复您的过程来创建本地存储库,遥控器指向 remote-repo.git

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.

这篇关于我无法在自己的git服务器上克隆我的存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆