Carthage update error: “GitHub API request failed: Bad credentials”

拈花ヽ惹草 提交于 2020-01-03 16:54:10

问题


Here is my Cartfile:

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

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

When I run carthage update I get this:

$ 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

So it does seem to build both Kanna and Realm, but I'm getting an error about bad GitHub API credentials. What is wrong?


回答1:


I got the solution in response to a Carthage issue I raised:

  1. Edit ~/.gitconfig and add the following:

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

    (Replace willhains with your GitHub user ID.)

  2. Clone a private repo via HTTPS.

  3. OSX will prompt for your GitHub password.

  4. Run carthage update.




回答2:


If you want to skip looking for binaries and just build from source:

carthage update --no-use-binaries 


来源:https://stackoverflow.com/questions/35790585/carthage-update-error-github-api-request-failed-bad-credentials

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