Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carthage can't download binary framework of a private repository #656

Closed
marcoconti83 opened this issue Aug 4, 2015 · 2 comments
Closed

Comments

@marcoconti83
Copy link
Contributor

Context

I'm using carthage bootstrap --use-ssh on a Cartfile with a private repository. The private repository has a release with an attached binary. This command is run on a remote build machine where I set up the ssh keys for github.

Issue

Carthage always build the dependent project from the source. It won't download the binary version attached to the release, even if it's there.

I would expect it to download the binary instead.

Investigation

I tried to debug Carthage by building it locally and adding some logs, it seems that when it tries to fetch the release JSON on the private repository (e.g. https://api.github.com/foo/bar/FooBar/releases/tags/1.2.2]) it receives this response:

{
    "documentation_url" = "https://developer.github.com/v3";
    message = "Not Found";
}

That is the same response that I get with

 curl https://api.github.com/foo/bar/FooBar/releases/tags/1.2.2

because no authentication data is specified. If I run:

curl --user foobar:324g453534tger543 https://api.github.com/foo/bar/FooBar/releases/tags/1.2.2

... I get the proper JSON.

Is there a way to use the SSH keys for GitHub API requests? If not, can the username/token combination needed for the request be passed by command line?

@mdiep
Copy link
Member

mdiep commented Aug 4, 2015

If you configure Git with a GitHub Personal Access Token, then Carthage should be able to authenticate for the GitHub API usage. (You can test that you're properly configured by cloning a private repo with Git over HTTPS.)

There are a couple items that haven't made it into a release yet that might also be helpful:

@marcoconti83
Copy link
Contributor Author

Thanks for the quick response.

Following your first suggestion, I created an internet password entry in the keychain on the build machine with the username and token from GitHub. This seems to work, thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants