window2003下搭建GIT服务器无法使用(Could not read from remote repository)

丛林鼠小弟 2014-10-20 04:54:02
参考:http://www.codeproject.com/Articles/296398/Step-by-Step-Setup-Git-Server-on-Windows-with-CopS
软件环境:
1、CopSSH (install on the server side)
2、msysgit (install both on the server side and client side)
3、PuTTY (install both on the server side and client side)

搭建了一个GIT服务器,可以通过:ssh 用户名@服务器名,利用ssh协议登录到我的服务器,但是无法利用”git clone 用户名@服务器名:/home/git/my_project.git“命令进行克隆,具体错误信息如下:
Cloning into 'my_project'...
fatal: '/home/git/my_project.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

我感觉就是我只是copssh的工具完成了客户机到服务器的登录,而利用客户机和服务器的git没有联通,不知道如何设置?请高手指教。
...全文
84142 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_39479224 2017-07-11
  • 打赏
  • 举报
回复
#15完美解决了
scut_fulianglee 2017-03-12
  • 打赏
  • 举报
回复
将url = git@github.com:manishnakar/polymer-demo.git ; 改成url = https://github.com/manishnakar/polymer-demo.git 即可
化境编程 2016-09-24
  • 打赏
  • 举报
回复
同样遇到这个问题 检查了所有设置都没问题就是连不上 只能说Windows下的ssh服务器就是个垃圾
donglou233 2016-07-06
  • 打赏
  • 举报
回复
我按照11楼的方法,成功了。(centos6.7系统)
sinat_34302218 2016-06-13
  • 打赏
  • 举报
回复
能帮我看看这是为什么吗?卡在这里好几天了,十分郁闷。
caike85 2016-05-27
  • 打赏
  • 举报
回复
楼主应当解决了吧。我这两天也是在折腾这个东西。我搭建完成后,也是从其他客户机上无法clone服务器的库。后来继续翻看:http://www.codeproject.com/Articles/296398/Step-by-Step-Setup-Git-Server-on-Windows-with-CopS,这里有图片写的地址是这样的:jinweijie@ryan-vm-01/ICW/home/jinweijie/mydotnetproject,这里没有指明ICW的anzhaung盘。 之后我尝试使用类似地址,我的地址是这样的:git clone 远程ssh用户@远程IP地址:/ICW/var/test/.git,实现了对搭建完成后库的clone。但是,在次步骤之前,我将本地产生的id_rsa.pub添加到了服务器的authorized_keys中,虽然不确定添加的是否正确。最后完成了对远程库的clone。
He_Salix 2015-11-20
  • 打赏
  • 举报
回复
我也出现同样的错误,最后发现.git下config文件url是这样的: url = git@github.com/username/test.git 然后对比其它仓库的配置,唯一不同就是域名后面不是用冒号,改为如下就搞定了: url = git@github.com:username/test.git
VilleHermanni 2015-10-30
  • 打赏
  • 举报
回复
看了stackoverflow上一位大神的解决方案:在.git目录下找到config文件,用nodepad++打开,找到url对应的那一行,重新写为: url = https://server/username/*your*git*app*.git (比如:url = https://hemcsec.tk/DEEP/myproject.git) 改完之后保存,重新git push -u origin master 问题解决。
放屁带出翔丶 2015-09-06
  • 打赏
  • 举报
回复
贴错了 Cloning into 'CloneTest'... fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 是这个,但是我的repository是存在的
放屁带出翔丶 2015-09-06
  • 打赏
  • 举报
回复
我现在也遇到了同样的问题 $ git clone XXXXXX Cloning into 'XXX'... ssh: XXXX: no address associated with name fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 请问各位大牛具体是怎么解决的?
zhuangfy 2015-08-21
  • 打赏
  • 举报
回复
这个问题我还没解决呢,请教大家
l1771783253 2015-06-12
  • 打赏
  • 举报
回复
个人认为原因有以下几种:1.服务器端应该初始化仓库:git init 2.确保服务器端的22端口打开,或者你修改到了其他的端口 3.路径的错误
好名字给猪了 2015-04-14
  • 打赏
  • 举报
回复
我也遇到楼主的一模一样的问题,怎么解决的望告知 fjy931101@163.com
好名字给猪了 2015-04-14
  • 打赏
  • 举报
回复



gitlab-shell 好像也有问题,问题在5.2中好像又回来了。HTTP clone 工作,SSH clone 需要加 repositories 目录。
git clone git@192.168.1.254:test/test.git
fatal: 'test/test.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

git clone git@192.168.1.254:repositories/test/test.git
可以成功clone
wuzhicheng123456 2015-01-07
  • 打赏
  • 举报
回复
同问,我设置的public,路径也正确,也报那个错
_扯淡的回忆 2014-10-23
  • 打赏
  • 举报
回复
”Please make sure you have the correct access rights and the repository exists“ 这句话已经告诉你了,你的权限和路径有错,git从服务器克隆代码的命令是git git@服务器地址:+你的项目名称 再克隆之前首先看你有没有那个权限

1,265

社区成员

发帖
与我相关
我的任务
社区描述
软件工程/管理 管理版
社区管理员
  • 研发管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧