1

我正在尝试构建一个可以克隆一个人的私人仓库(经许可)并对其进行分析的应用程序,类似于 codeclimate 所做的。我想在不使用部署密钥或弄乱 ssh 的情况下做到这一点。我注意到 codeclimate 使用 github 的 Oauth 并且只需单击一下,但我在我的应用程序上进行了测试,我遇到了我在这个问题中概述的问题:Oauth Cloning on github not working (fatal: Authentication failed)

那么,在获得许可且用户无需使用我的 github 应用程序创建部署密钥的情况下,我可以使用什么方法来克隆私有 git 存储库?

4

2 回答 2

1
  1. 在 github 中定义您的应用程序:https ://github.com/settings/applications
  2. 添加部署(公共)密钥:http: //developer.github.com/v3/repos/keys/#create
  3. 调整您的 ssh 设置以使用此关联的私钥 为 Github 私有存储库验证 Jenkins CI
  4. 具有特定 uri 的 git clone
于 2013-05-17T11:51:30.247 回答
1

首先看一下github api:

http://developer.github.com/v3

通过身份验证后,您可以查看用户存储库:http: //developer.github.com/v3/repos/

一旦选择了 repo,您​​也可以从 api 执行“git”调用:http: //developer.github.com/v3/git/

你可以阅读提交、blob、树、分支、标签、引用......几乎所有内容。

于 2013-04-04T20:32:01.217 回答