1. Go编译报错信息

E:\work\hqsource\stock\quote_sh_l2_parser>go build
go: xxxxxxx/yyyyyyyy/quote_lib@v0.3.115-0.20220302053425-232076327f09: invalid version: git ls-remote -q origin in C:\Go\repository\pkg\mod\cache\vcs\87198654213a7c861ce67251dbddf3f94fb383755ea8e89812eb7f12fc9c666e: exit status 128:fatal: 'origin' does not appear to be a git repositoryfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.

go编译时,git需要拉取对应的依赖库,拉取依赖库时,会先去GOPATH路径下的缓存去查找,如果缓存不正确,就有可能导致莫名其妙的问题。上面问题关键在这里

invalid version: git ls-remote -q origin in C:\Go\repository\pkg\mod\cache\vcs\87198654213a7c861ce67251dbddf3f94fb383755ea8e89812eb7f12fc9c666e

2. 解决方案

删除go同步依赖库的缓存,很多时候可能由于缓存有问题,造成了莫名其妙的错误,就类似于Java项目的maven时,依赖库没有正确下载,后续因为缓存库引入有问题,需要重新清理一下缓存才能正确编译和使用。

现在我们找到上面的文件夹,然后删除此文件夹。文件的路劲根据提示自己确认。我的需要删除的文件夹如下:

C:\Go\repository\pkg\mod\cache\vcs\87198654213a7c861ce67251dbddf3f94fb383755ea8e89812eb7f12fc9c666e

fatal: ‘origin‘ does not appear to be a git repository相关推荐

  1. 执行git命令时出现fatal: ‘origin‘ does not appear to be a git repository错误

    执行git命令时出现fatal: 'origin' does not appear to be a git repository错误 在执行git pull origin master时出现: fat ...

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

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

  3. 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. ...

  4. 解决“fatal: 'origin' does not appear to be a git repository...”

    当使用Git进行代码push提交时,出现报错信息"fatal: 'origin' does not appear to be a git repository...", $ git ...

  5. 详解git pull命令和使用过程中遇到的常见问题:fatal: ‘origin‘ does not appear to be a git repository

    使用git pull同步远程代码 使用git管理测试相关代码时,因为测试代码本身量级不大,所以很少使用分支,默认都使用master(主分支),当我们想要从远程origin(origin是远程仓remo ...

  6. Git本地仓库提交代码到远程仓库出现报错:fatal: ‘origin‘ does not appear to be a git repository fatal: Could not read fr

    Git本地仓库提交代码到远程仓库出现报错:fatal: 'origin' does not appear to be a git repository fatal: Could not read fr ...

  7. git-报错总结-fatal: 'origin' does not appear to be a git repository...

    1.在push时候报错,'origin' does not appear to be a git repository- 但是我的库是有的,检查分支也能检查到分支,就是push时候报错.可能两种原因, ...

  8. 解决“fatal: ‘origin‘ does not appear to be a git repository...”

    当使用Git进行代码push提交时,出现报错信息"fatal: 'origin' does not appear to be a git repository...", $ git ...

  9. git报错:‘origin‘does not appear to be a git repository的解决方法

    文章目录 #事故现场 #解决方法 #事故现场 git push origin master时报错: fatal: 'origin' does not appear to be a git reposi ...

最新文章

  1. 教育部发文35所高校新增AI本科专业!想回去重新高考
  2. RESTful API接口文档规范小坑
  3. 安卓学习笔记16:常用控件 - 标签
  4. poj 1155 TELE
  5. 吝啬的国度 ---用vector 来构图
  6. zTree保持展开单一路径之简易实现
  7. 【2019杭电多校第二场1005 = HDU6595】Everything Is Generated In Equal Probability(期望-递推)
  8. 7216:Minecraft题解
  9. 程序员的自我修养之数学基础10:超定方程的求解
  10. 参数检验和非参数检验的区别
  11. 12306火车票查询订票
  12. Windows CE SDHC驱动简析(1)-驱动架构(基于WinCE5.0 SMDK2410 BSP的SDHC驱动)
  13. Python之校庆代码
  14. Lsyncd:负载均衡之后,服务器的文件双向同步
  15. 不等距双杆模型_对磁场中双杆模型问题的解析
  16. Android中基于心知天气API获取天气信息
  17. 后台管理系统,前端框架
  18. <塞梅普雷斯 如是说> 第二部 0.序
  19. Population and carrying capacity 的第二阶段 :Crowding affects lifetime.
  20. android 闹钟不响,为什么我写的Android闹钟到时间时却不会响

热门文章

  1. 图像风格迁移cvpr2020_CVPR 2020 论文大盘点-文本图像篇
  2. 计算机桌面没有打字,电脑输入法不见了怎么办
  3. 仿商城商品生成分享海报图片和识别图中二维码并跳转商品详情页
  4. Matlab建模—回归拟合(ployfit与regress使用)
  5. Hadoop-1-大数据概述
  6. phpcmsV9 全站搜索功能如何实现
  7. Elastix 设置呼叫转移
  8. 派森学python_派森个人学习笔记------2020.09.06
  9. 火了,新东方年会吐槽视频《释放自我》:累死累活干不过写PPT的
  10. 计算机开机硬件检查,开机bios检测硬件信息方法