Pod Install 卡住報(bào)錯(cuò)

1. 問(wèn)題

最近在同事電腦上執(zhí)行 pod install 會(huì)出現(xiàn)不響應(yīng)的情況。

Cloning spec repo `cocoapods` from `https://github.com/CocoaPods/Specs.git`

# 過(guò)了很久很久沒(méi)反應(yīng)

[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `cocoapods`.
You can try adding it manually in `/Users/xxx/.cocoapods/repos` or via `pod repo add`.

2. 解決方案

cd ~/.cocoapods/repos/

檢查一下 master 文件夾是否存在,如果存在 master 文件夾,執(zhí)行 pod repo remove master。不存在則跳過(guò)這一條命令。

pod repo remove master

接下來(lái)繼續(xù)執(zhí)行以下命令

pod setup
git clone --depth 1 https://github.com/CocoaPods/Specs.git master

此時(shí)應(yīng)該已經(jīng)解決了。

3. 其他報(bào)錯(cuò)情況

如果執(zhí)行第二步后仍有以下報(bào)錯(cuò)。(PS:我沒(méi)實(shí)際遇到過(guò),解決問(wèn)題時(shí)找到別的帖子,順手記錄了下來(lái))

error: RPC failed; curl 18 transfer closed with outstanding read data remaining 
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

執(zhí)行以下命令

git config --global http.postBuffer 524288000

4. 追蹤遠(yuǎn)程分支

git remote set-branches origin '*'
?著作權(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),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

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

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