這是我Cartfile:迦太基更新錯誤: 「GitHub的API請求失敗:壞憑據」
# 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憑據的錯誤。哪裏不對?
迦太基哪個版本您使用的?你可以通過運行'carthage version'來確定它。 – jpsim
@jpsim'carthage version'說'0.15'。 –
我不是迦太基專家,但是從錯誤消息來看,它會出現你的GitHub API證書無效。從閱讀Carthage的源代碼(https://github.com/Carthage/Carthage/blob/0.15/Source/CarthageKit/GitHub.swift#L378-L409),它會顯示它使用'GITHUB_ACCESS_TOKEN'來驗證GitHub API請求。您是否將此值設置爲環境變量?如果是這樣,它是一個有效的標誌?您最近是否在GitHub.com上撤銷了此令牌?如果您的令牌有效並且未被撤消,我建議您向迦太基項目提出問題,因爲這可能是一個錯誤。 – jpsim