问题
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
- Open Keychain app
- In Keychain Access, search github.com
- Find the "internet password" entry for github.com
- Edit or delete the entry accordingly
Windows
- Goto control panel > user accounts > credential manager > Windows credentials > Generic credentials
- Remove Github keys
来源:https://stackoverflow.com/questions/58709416/error-installing-alamofire-in-mac-using-pod