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?
Carthage is trying to downloading a pre-built binary of both frameworks from the GitHub release. Carthage gets your GitHub credentials from git
and uses them to make the API request.
If you want to prevent this, you'll need to set a new set of credentials with Git's credential helper.
Thanks @mdiep — with your help, I figured it out.
For others stumbling across this issue, here are the steps that solved it for me:
~/.gitconfig
and add the following:
[credential]
helper = osxkeychain
[credential "https://github.com"]
username = willhains
(Replace willhains
with your GitHub user ID.)
carthage update
.I had the same issue and had to upgrade to the latest version.
Most helpful comment
Thanks @mdiep — with your help, I figured it out.
For others stumbling across this issue, here are the steps that solved it for me:
~/.gitconfig
and add the following:[credential] helper = osxkeychain [credential "https://github.com"] username = willhains
(Replace
willhains
with your GitHub user ID.)carthage update
.