今天在电脑上用Git pull命令来更新本地项目,突然发现出现如标题的错误:

[plain] view plaincopyprint?
  1. user ~/c/quhao$git pull
  2. fatal: No remote repository specified.  Please, specify either a URL or a
  3. remote name from which new revisions should be fetched.

出现这个问题的原因是.git/config的配置出问题了。

解决方法是从其他项目里拷贝一份config过来,再改一下里面的url就可以了,或者用下面的模板:

[plain] view plaincopyprint?
  1. [core]
  2. repositoryformatversion = 0
  3. filemode = true
  4. bare = false
  5. logallrefupdates = true
  6. ignorecase = true
  7. precomposeunicode = false
  8. [remote "origin"]
  9. url = https://github.com/CrossLee/xxx.git
  10. fetch = +refs/heads/*:refs/remotes/origin/*
  11. pushurl = https://github.com/CrossLee/xxx.git
  12. [branch "master"]
  13. remote = origin
  14. merge = refs/heads/master

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

[plain] view plaincopyprint?
  1. url = https://github.com/CrossLee/xxx.git
  2. pushurl = https://github.com/CrossLee/xxx.git

来源:http://blog.csdn.net/withiter/article/details/14107165

解决fatal: No remote repository specified. Please, specify either a URL...相关推荐

  1. 解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas

    今天用idea提交代码到github上,push后报错 git@github.com: Permission denied (publickey). fatal: Could not read fro ...

  2. git解决 “fatal: Could not read from remote repository.“

    问题描述: 在使用Git将本地仓库推送到远程仓库的时候,发生了如下错误:"fatal: Could not read from remote repository." 问题原因: ...

  3. Permission denied (publickey). fatal: Could not read from remote repository.

    博主在github上下载tiny face的的源代码的时候,遇到git clone命令为:git clone --recursive git@github.com:peiyunh/tiny.git 而 ...

  4. git@github.com:Permission denied(publickey).fatal: Could not read form remote repository错误

    文章目录 前言 问题分析 解决方法 配置客户端 配置服务端 验证 前言 在使用goland从github下载依赖时(git clone github.com/gin-gonic/gin)出现git@g ...

  5. 将本地已经存在的代码跟github上新建的仓库建立关联,解决“fatal: 'origin' does not appear to be a git repository...”

    我想将本地已经存在的代码跟github上新建的仓库建立关联,步骤如下: 进入本地目录,初始化本地仓库 1.进入本地目录,初始化本地仓库:git init 2.将文件添加到仓库:git add . 3. ...

  6. fatal: ‘origin‘ does not appear to be a git repository fatal: Could not read from remote repository.

    fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. ...

  7. Git push错误,Unauthorized fatal: Could not read from remote repository.未验证不能提交

    错误 git push -u origin master Unauthorized fatal: Could not read from remote repository. (Bitbucket - ...

  8. 关于Git使用:fatal: Could not read from remote repository.的报错问题解决

    目录 一:问题描述 二:解决过程 1,增加账号及邮箱 2,添加秘钥: 3,获取公钥并将其设置到云效里面 4,宝塔终端 解除密码 三:解决截图 一:问题描述 我们公司的版本仓库用的是阿里云效,因为前一阵 ...

  9. MAC电脑gitt@github.com: Permission denied (publickey). fatal: Could not read from remote repository

    本地上传代码时,执行命令:git push -u origin master遇到下面错误提示 gitt@github.com: Permission denied (publickey). fatal ...

最新文章

  1. python导入模块的三种方法,例子: import numpy和from numpy import * (import matplotlib 和 from matplotlib import *)
  2. python手机版做小游戏代码大全-python简单小游戏代码 怎么用Python制作简单小游戏...
  3. go项目中使用数据库的配置文件
  4. 进程有一个全局变量 i,还有有两个线程。i++ 在两个线程里边分别执行 100 次,能得到的最大值和最小值分别是多少?
  5. win7 VS2008 编译luabind-0.9.1 动态库 静态库
  6. 第三次学JAVA再学不好就吃翔(part28)--猜数字小游戏
  7. php恋爱,突然想到php程序和谈恋爱很相似
  8. android项目中有哪几种依赖关系,Android Studio项目中三种依赖的添加方式
  9. 2017国民行业分类sql-存储过程_存储函数-MySQL
  10. 微信二级不死域名和微信白名单的区别?
  11. 求一个十六进制数的各二进制位_C语言实现
  12. 分组查询最新的一条记录
  13. 某人写的openCV学习笔记
  14. java毕业设计_短视频分享网站
  15. linux 终端分屏命令vsp(转)
  16. MySQL密码忘记了?不慌~
  17. layui table 动态设置 elem(绑定table)和 where 条件参数
  18. MDNet(multi domain CNN用于视觉跟踪)--源代码详解--mdnet_features_fcX.m
  19. PLS-DA分析R实现
  20. 量子物理史话,很好看

热门文章

  1. python中代理模式分为几种类型_代理模式
  2. 「C++: draft」一张图弄懂C++指针(*)和引用()以及深拷贝、浅拷贝
  3. hibernate 延迟加载的错误 failed to lazily initialize a collection of role
  4. Oracle中PLSQL中一个例外的写法
  5. Mysql 死锁过程及案例详解之清空缓存锁Flush Lock
  6. Python 卡方检验演算
  7. php插入成功数据不显示,PHP插入数据不成功,什么原因呢?
  8. CodeMirror 5.46.0 发布,多功能在线代码编辑器
  9. python进程和线程中的两个锁
  10. Message,MessageQueue,Looper,Handler详解+实例