繁体   English   中英

我无法在自己的git服务器中克隆存储库

[英]I can't clone my repository in my own git server

我无法克隆我的存储库

我将解释我已完成的步骤
1)我正在使用Windows 8
2)运行Git Bash
3)$ mkdir git_ball
4)$ cd git_ball
5)$ git init,在c:/Users/user1/git_ball/.git/中返回已初始化的空Git存储库
6)$ ls> list.txt
7)$ git添加。
8)$ git commit -m'创建list.txt'
9)$ git config push.default匹配
10)$ git远程添加源/ c / Users / user1 / git_ball
11)$ git config http.sslVerify“ false”
12)$ git push origin,它提供:最新的
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 =没有这样的文件或目录

我不知道缺少什么,我想使用我的IP复制git_ball,在这种情况下您能帮我吗? 这个想法也是使用我的IP将git_ball从另一台PC克隆到同一LAN网络中。

谢谢

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

基本上,您必须在本地计算机上配置两个存储库:远程存储库和本地存储库。 要配置远程存储库:

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

此时,您可以重复此过程以创建本地存储库,在第10点处,将远程设置为指向remote-repo.git

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM