Permission to CocoaPods / Specs.git prohibited

Currently, the following error appears when I try to push.

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 

It all started when I switched from 0.36 to version 1.0.1

I tried reinstalling CocoaPods by deleting all CocoaPods files in the project (worksapce, podfile, pod folder, podfile.lock) and doing a new β€œinit init”, clearing CocoaPods caches and a number of other things.

It seems like it is trying to push my commits to a Specs reposition. I noticed that "pod install" changes my git repository to point to specs repo:

enter image description here

My subfile:

 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 
+7
git github cocoapods
source share
2 answers

I have the same error, I just switch to cocoa pod to 1.0.1 ...

basically your origin been changed to https://github.com/CocoaPods/Specs.git

you can check:

 ➜ git:(new_version) git remote -vv origin https://github.com/CocoaPods/Specs.git (fetch) origin https://github.com/CocoaPods/Specs.git (push) 

you can change this either through the terminal or manually change the file

Terminal:

 git remote set-url origin https://github.com/PSEUDO/NAME_OF_YOUR_GIT.git 

or , go to the .git\config file and change

 [remote "origin"] url = https://github.com/PSEUDO/NAME_OF_YOUR_GIT.git fetch = +refs/heads/*:refs/remotes/origin/* 

to

 [remote "origin"] url = https://github.com/PSEUDO/NAME_OF_YOUR_GIT.git fetch = +refs/heads/*:refs/remotes/origin/* 
+10
source share

So it turns out that "pod install" really changed my git. As you can see in my git configuration, the URL was changed to https://github.com/CocoaPods/Specs.git , which I changed to point to my git repository and everything was fixed.

 ➜ .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
source share

All Articles