Error installing Alamofire in Mac Using Pod

依然范特西╮ 提交于 2020-08-11 03:58:23

问题


I am trying to install Alamofire for iOS app development using pod. My podfile looks like below:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'AlamoFireBackgroundTask' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  pod 'Alamofire'
  # Pods for AlamoFireBackgroundTask

end

when I run

pod install

I get the following error message:

[!] Error installing Alamofire
[!] /usr/bin/git clone https://github.com/Alamofire/Alamofire.git /var/folders/0f/tk8t38hn0pq_81glyqfgsp6m0000gn/T/d20191105-77916-ujlfnd --template= --single-branch --depth 1 --branch 4.9.1

Cloning into '/var/folders/0f/tk8t38hn0pq_81glyqfgsp6m0000gn/T/d20191105-77916-ujlfnd'...
error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403 Forbidden
fatal: the remote end hung up unexpectedly

can anyone suggest a solution?


回答1:


‘403’ means access forbidden. Sometimes your credentials stored in machines become stale especially if you switch between multiple github accounts. Below solution might work,

Mac

  1. Open Keychain app
  2. In Keychain Access, search github.com
  3. Find the "internet password" entry for github.com
  4. Edit or delete the entry accordingly

Windows

  1. Goto control panel > user accounts > credential manager > Windows credentials > Generic credentials
  2. Remove Github keys


来源:https://stackoverflow.com/questions/58709416/error-installing-alamofire-in-mac-using-pod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!