您的位置:首页 > 其它

git pull命令更新本地项目的时候遇到“No remote repository specified……”的错误

2016-08-17 14:36 627 查看
有些用户在使用git pull命令更新本地项目的时候会遇到“No remote repository specified……”的错误,那么要如何解决呢?

git pull

fatal: No remote repository specified.  Please, specify either a URL or a

remote name from which new revisions should be fetched.

其实出问题的原因是.git/config的配置出问题了。

解决方法:

修改“.git”文件夹里面的“config”文件的url就可以了:

[html]
view plain
copy





[core]  
        repositoryformatversion = 0  
        filemode = true  
        bare = false  
        logallrefupdates = true  
        ignorecase = true  
        precomposeunicode = false  
[remote "origin"]  
        url = https://github.com/checkfrank/checkfrank.github.io.git  
        fetch = +refs/heads/*:refs/remotes/origin/*  
        pushurl = https://github.com/checkfrank/checkfrank.github.io.git  
[branch "master"]  
        remote = origin  
        merge = refs/heads/master  

把其中换成你项目的地址就可以了:

[html]
view plain
copy





url = https://github.com/CrossLee/xxx.git  
pushurl = https://github.com/CrossLee/xxx.git 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐