2016-09-29 35 views
7

当我尝试进行推送时,目前出现以下错误。CocoaPods/Specs.git的权限被拒绝

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 

这一切开始时我从0.36搬到版本1.0.1

我试着重新安装的CocoaPods,除去项目(worksapce,podfile,荚文件夹,podfile所有的CocoaPods文件。锁定)并执行新的'pod init',清除CocoaPods缓存和其他许多事情。

这似乎是它试图推动我的承诺规格回购。我已经注意到“吊舱安装”已经改变了我的混帐repot指向规格回购:

enter image description here

我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

那么为什么在'pod install'上改变git'origin'的Cocoapods? – willrichman

回答

10

我有同样的错误我只是改变可可豆荚为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/* 
+0

头脑清醒...为什么更新可可豆荚会做到这一点令人难以置信。 – Unome

0

因此,原来“吊舱安装”,实际上确实改变了我的git。如可以在我的混帐配置可以看出,网址变更为https://github.com/CocoaPods/Specs.git,我改回点给我的混帐回购协议及所有固定

➜ .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 
+0

我有同样的问题,整天带我去弄清楚!来到这里确认是否在我的git源代码上写了“pod install”或“pod update”以及CocoaPods规范url。 – avance