遇到一个错误:

fatal: Remote branch #{s.version} not found in upstream origin

解决办法

  • 网上搜了很多,都无效
  • 可能仅适用我的情况,分享出来看看?(万一有遇到相似的呢)

将 podspec 文件  替换成 "

详细信息:

$ pod spec lint 

;49m -> XXXXX (0.0.4)
    - WARN  | source: The version should be included in the Git tag.
    - ERROR | [iOS] unknown: Encountered an unknown error (;49m[!] /usr/bin/git clone https://github.com/XXXXX/XXXXX.git /var/folders/m3/_w136hjd7w37766lrqbndsdw0000gn/T/d20180928-83208-x4huy2 --template= --single-branch --depth 1 --branch #{s.version}    

Cloning into '/var/folders/m3/_w136hjd7w37766lrqbndsdw0000gn/T/d20180928-83208-x4huy2'...
warning: Could not find remote branch #{s.version} to clone.
fatal: Remote branch #{s.version} not found in upstream origin
) during validation.    

Analyzed 1 podspec. 

;49m[!] The spec did not pass validation, due to 1 error and 1 warning.

 

从Github上看,一切都没有问题,直接执行:

/usr/bin/git clone https://github.com/XXXXX/XXXXX.git /var/folders/m3/_w136hjd7w37766lrqbndsdw0000gn/T/d20180928-83208-x4huy2 --template= --single-branch --depth 1 --branch 0.0.4

也可以Clone下来,百思不得其解,最后对比了一下之前的Tag,发现做了一次 podspec文件 " 到 ' 的替换,替换回来试了试,竟然搞定了!!!!!

 

转载于:https://www.cnblogs.com/kongkaikai/p/9721307.html

Logo

GitCode 天启AI是一款由 GitCode 团队打造的智能助手,基于先进的LLM(大语言模型)与多智能体 Agent 技术构建,致力于为用户提供高效、智能、多模态的创作与开发支持。它不仅支持自然语言对话,还具备处理文件、生成 PPT、撰写分析报告、开发 Web 应用等多项能力,真正做到“一句话,让 Al帮你完成复杂任务”。

更多推荐