码迷,mamicode.com
首页 > 其他好文 > 详细

更换仓库地址后,git fetch origin master报错

时间:2014-11-10 12:12:36      阅读:363      评论:0      收藏:0      [点我收藏+]

标签:style   io   color   ar   os   sp   for   on   问题   

1.问题描述:

今天服务器迁移了下git,于是就直接根据拷贝后的git repo创建了远程仓库,本来一切都很顺利。

服务器端执行命令报错。记录下解决过程

2.执行命令报错

$ git fetch origin master
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
50:a9:7a:a2:e6:cc:ae:ea:99:d0:f1:6e:ee:fa:e6:1e.
Please contact your system administrator.
Add correct host key in /c/Users/Administrator/.ssh/known_hosts to get rid of th
is message.
Offending key in /c/Users/Administrator/.ssh/known_hosts:13
RSA host key for 192.168.20.85 has changed and you have requested strict checkin
g.
Host key verification failed.
fatal: Could not read from remote repository.


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

3.解决方法:


vim  /c/Users/Administrator/.ssh/known_hosts



删除 known_hosts里面关于访问ip地址相关的 信息,保存退出即可。


4.重新执行fetch命令


$ git fetch origin master
The authenticity of host ‘192.168.20.85 (192.168.20.85)‘ can‘t be established.
RSA key fingerprint is 50:a9:7a:a2:e6:cc:ae:ea:99:d0:f1:6e:ee:fa:e6:1e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.20.85‘ (RSA) to the list of known hosts.
git@192.168.20.85‘s password:
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 7 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (7/7), done.
From 192.168.20.85:/home/repo/project/
 * branch            master     -> FETCH_HEAD





更换仓库地址后,git fetch origin master报错

标签:style   io   color   ar   os   sp   for   on   问题   

原文地址:http://my.oschina.net/dlpinghailinfeng/blog/342637

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!