使用Pod在Mac中安装Alamofire时出错

问题描述 投票:0回答:1

我正在尝试使用pod为iOS应用程序开发安装Alamofire。我的podfile如下所示:

# 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

我跑步时

pod install

我收到以下错误消息:

[!] 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

有人可以提出解决方案吗?

ios swift cocoapods alamofire
1个回答
0
投票

“ 403”表示禁止访问。有时,存储在计算机中的凭据会过时,尤其是当您在多个github帐户之间切换时。以下解决方案可能有效,

Mac

  1. 打开钥匙串应用
  2. 在钥匙串访问中,搜索github.com
  3. 找到github.com的“互联网密码”条目
  4. 相应地编辑或删除条目

Windows

  1. 转到控制面板>用户帐户>凭据管理器> Windows凭据>通用凭据
  2. 删除Github键
© www.soinside.com 2019 - 2024. All rights reserved.