git - CocoaPods/Specs.git 的权限被拒绝

标签 git github cocoapods

当前在尝试推送时遇到以下错误。

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:

enter image description here

我的播客文件:

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/

相关文章:

visual-studio - VS2013 with GitHub - 停止由提交的 typescript 文件制作的 JS 文件

ios - "pod install"返回 "[!] Unable to find a target"

git - 如何使用 bash 将 cd 转到最近的具有 .git 文件夹的父文件夹?

git - 在git repo中获取文件的最后修改日期

git - 如何使用 git 创建一个分支并重置另一个分支?

ios - React native Pod 安装得到权限被拒绝

ios - 'pod init' 返回:不允许操作 - getcwd (Errno::EPERM)

iphone - 在 iPhone 项目中使用 git

git push 错误邮箱 GitHub

git - 在不使用 Git 的情况下在 GitHub 存储库中创建文件夹