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

Crazy凡發表於2018-09-28

遇到一個錯誤:

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 檔案 "' 的替換,替換回來試了試,竟然搞定了!!!!!

螢幕快照 2018-09-28 下午10.04.38.png

相關文章