4

这是我的购物车文件:

# Kanna HTML parsing library
github "tid-kijyun/Kanna" ~> 1.0.0

# Realm database/ORM
github "realm/realm-cocoa"

当我跑步时,carthage update我得到了这个:

$ carthage --version
Unrecognized command: '--version'. See `carthage help`.

$ carthage update --platform OSX
*** Fetching realm-cocoa
*** Fetching Kanna
*** Skipped downloading realm-cocoa.framework binary due to the error:
    "GitHub API request failed: Bad credentials"
*** Checking out realm-cocoa at "v0.98.3"
*** Skipped downloading Kanna.framework binary due to the error:
    "GitHub API request failed: Bad credentials"
*** Checking out Kanna at "1.0.5"
*** xcodebuild output can be found in /var/folders/p2/c_d5mx0s3gl45165btrpx1fm0000gn/T/carthage-xcodebuild.KVYEob.log
*** Building scheme "Kanna_OSX" in Kanna.xcworkspace
*** Building scheme "RealmSwift" in RealmExamples.xcworkspace
*** Building scheme "Realm" in RealmExamples.xcworkspace

所以它似乎同时构建了 Kanna 和 Realm,但我收到了一个关于错误的 GitHub API 凭据的错误。怎么了?

4

2 回答 2

3

针对我提出的迦太基问题,我得到了解决方案:

  1. 编辑~/.gitconfig并添加以下内容:

    [credential] helper = osxkeychain [credential "https://github.com"] username = willhains

    (替换willhains为您的 GitHub 用户 ID。)

  2. 通过 HTTPS 克隆一个私有仓库。

  3. OSX 将提示您输入 GitHub 密码。

  4. 运行carthage update

于 2016-03-13T09:06:36.427 回答
1

如果您想跳过查找二进制文件而只从源代码构建:

carthage update --no-use-binaries 
于 2018-01-10T12:22:33.560 回答