当我尝试推送时,目前收到以下错误。
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:
我的Podfile:
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
答案 0 :(得分:10)
我有同样的错误,我只是将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/*
答案 1 :(得分:0)
事实证明" pod install"实际上确实改变了我的git。从我的git配置中可以看出,url已更改为https://github.com/CocoaPods/Specs.git,我更改回指向我的git repo并且所有内容都已修复
➜ .git git: cd .git
➜ .git git: cat config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://github.com/CocoaPods/Specs.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master