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

遇到一個(gè)錯(cuò)誤:

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

解決辦法

  • 網(wǎng)上搜了很多,都無效
  • 可能僅適用我的情況,分享出來看看??(萬一有遇到相似的呢)

podspec 文件 替換成 "

詳細(xì)信息:

$ 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上看,一切都沒有問題,直接執(zhí)行:

/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下來,百思不得其解,最后對(duì)比了一下之前的Tag,發(fā)現(xiàn)做了一次 podspec 文件 "' 的替換,替換回來試了試,竟然搞定了?。。。?!

屏幕快照 2018-09-28 下午10.04.38.png
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Android 自定義View的各種姿勢(shì)1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 179,039評(píng)論 25 709
  • 用兩張圖告訴你,為什么你的 App 會(huì)卡頓? - Android - 掘金 Cover 有什么料? 從這篇文章中你...
    hw1212閱讀 13,992評(píng)論 2 59
  • 一、創(chuàng)建的github倉庫原文地址 1 進(jìn)入Github網(wǎng)站www.github.com登陸自己的賬號(hào)后 2 建立...
    freesan44閱讀 4,120評(píng)論 2 12
  • 項(xiàng)目組件化、平臺(tái)化是技術(shù)公司的共同目標(biāo),越來越多的技術(shù)公司推崇使用pod管理第三方庫以及私有組件,一方面使項(xiàng)目架構(gòu)...
    swu_luo閱讀 22,847評(píng)論 0 39
  • 寒假回高中的校園轉(zhuǎn)了轉(zhuǎn),那個(gè)時(shí)候高中還未放假,正是下課的時(shí)候,一群女孩子迎面走來,笑嘻嘻地打鬧成一團(tuán)朝小賣部而去。...
    六月蟬羽閱讀 415評(píng)論 0 3

友情鏈接更多精彩內(nèi)容