https://cloud.tencent.com/developer/article/1351981
錯(cuò)誤1:Git: fatal: The remote end hung up unexpectedly
解決辦法:
> git config --global http.postBuffer 1048576000
> git config --global http.postBuffer 1048576000
錯(cuò)誤2:Git error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
錯(cuò)誤信息:
Total 116323 (delta 81906), reused 116320 (delta 81905)
POST git-receive-pack (130907163 bytes)
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
git 在 pull 或者 push 一個(gè)大項(xiàng)目時(shí),可能會(huì)碰到出現(xiàn)如題所示的錯(cuò)誤。
解決辦法:
網(wǎng)絡(luò)上往往都會(huì)說(shuō)這是由于大文件造成的提交或者拉取失敗。但是,經(jīng)過(guò)本人測(cè)試,如果是 errno 56,那么應(yīng)該是有大文件或者提交緩存方面的問(wèn)題。而 errno 54 則不是這個(gè)問(wèn)題。對(duì)于 56 錯(cuò)誤的解決方式與網(wǎng)絡(luò)上大部分文章的一致。都是增大緩存配置,比如下面就是配置提交緩存為 500M。
> git config http.postBuffer 524288000
> git config https.postBuffer 524288000
對(duì)于 errno 54 這個(gè)錯(cuò)誤,經(jīng)嘗試 http 或者 https 協(xié)議都無(wú)法正常提交。必須改為 ssh 方式來(lái)提交代碼。也就是必須使用公私鑰的方式進(jìn)行賬號(hào)驗(yàn)證,并提交代碼。
Git配置SSH Key請(qǐng)參考 Git配置SSH Key
錯(cuò)誤3:error:The branch ‘testing’ is not fully merged
解決辦法:強(qiáng)制刪除
# 普通刪除
git branch -d branch_name
# 強(qiáng)制刪除
git branch -D branch_name
問(wèn)題一: [!] Unable to add a source with url https://github.com/CocoaPods/Specs.git named cocoapods.
You can try adding it manually in /Users/glodon/.cocoapods/repos or via pod repo add.
解決:
pod repo add master https://github.com/CocoaPods/Specs.git
問(wèn)題:Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
刪除./cocoapods 目錄下repo 文件中所有文件
重新pod setup 或者直接到spec GitHub 地址 直接下載下來(lái)更改文件名稱(chēng)為 master 拖進(jìn)repos 文件目錄下,并進(jìn)入repos git pull
或者是直接pod setup
--unsafe-perm=true --allow-root
Cloning spec repo cocoapods from https://github.com/CocoaPods/Specs.git
解決方案
CocoaPods 1.8將CDN切換為默認(rèn)的spec repo源是trunk源,podfile文件中一定要指定master源。
但我們更改源之后還不能使用,可能與我們的網(wǎng)絡(luò)有一定關(guān)系,下面是我的解決方案。
首先更改源,因?yàn)樵囘^(guò)幾個(gè)常用的,都不好使,所以我改用了清華大學(xué)的源。
新版的 CocoaPods 不允許用pod repo add直接添加master庫(kù)了,但是依然可以:
pod repo remove master
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
最后進(jìn)入自己的工程,在自己工程的podFile第一行加上:
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
完事之后記得remove trunk ,執(zhí)行下面的命令
pod repo remove trunk
如果不執(zhí)行remove還可能會(huì)出現(xiàn) CDN:trunk 的問(wèn)題。
mac dart