pflous pflous - 2 months ago 33
Git Question

Permission to CocoaPods/Specs.git denied

Currently getting the following error when I'm trying to do a 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


This all started when I moved from .36 to version 1.0.1

I've tried reinstalling CocoaPods, removing all the CocoaPods files in the project (worksapce, podfile, pod folder, podfile.lock) and doing a fresh 'pod init', clearing CocoaPods caches and a number of other things.

It seems like its trying to push my commits to the Specs repo. I've been noticing "pod install" has been changing my git repot to point to the specs repo:

enter image description here

My 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

Answer

I have the same bug I just change to cocoa pod to 1.0.1...

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

you can check with:

➜  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 terminal or modify the file manually

Terminal:

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

or, go into .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/*
Comments