当前在尝试推送时遇到以下错误。
git:(swift3) git push --set-upstream origin swift3
remote: Permission to CocoaPods/Specs.git denied to paul301.
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': The requested URL returned error: 403
这一切都是从我从 .36 迁移到 1.0.1 版本开始的
我尝试重新安装 CocoaPods,删除项目中的所有 CocoaPods 文件(worksapce、podfile、pod 文件夹、podfile.lock)并执行全新的“pod init”、清除 CocoaPods 缓存和许多其他操作。
它似乎试图将我的提交推送到 Specs 存储库。我一直注意到“pod install”一直在更改我的 git repot 以指向 specs repo:
我的播客文件:
platform :ios, '9.0'
target 'Test' do
use_frameworks!
pod 'Moya', '8.0.0-beta.2'
pod 'iCarousel'
pod 'ObjectMapper', '~> 2.0'
pod 'Alamofire', '~> 4.0'
pod 'FacebookCore'
pod 'FacebookLogin'
end
最佳答案
我有同样的错误,我只是将 cocoa pod 更改为 1.0.1...
基本上,您的 origin
已更改为 https://github.com/CocoaPods/Specs.git
您可以检查:
➜ git:(new_version) git remote -vv
origin https://github.com/CocoaPods/Specs.git (fetch)
origin https://github.com/CocoaPods/Specs.git (push)
您可以通过终端或手动修改文件来更改它
终端:
git remote set-url origin https://github.com/PSEUDO/NAME_OF_YOUR_GIT.git
或者,进入.git\config
文件并修改
[remote "origin"]
url = https://github.com/PSEUDO/NAME_OF_YOUR_GIT.git
fetch = +refs/heads/*:refs/remotes/origin/*
到
[remote "origin"]
url = https://github.com/PSEUDO/NAME_OF_YOUR_GIT.git
fetch = +refs/heads/*:refs/remotes/origin/*
关于git - CocoaPods/Specs.git 的权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39771790/