Andrew Font
Andrew Font

Reputation: 1285

Cloning private github repos without deploy keys?

I am trying to build an application that can clone a person's private repo (with permission), and run analysis on it, similar to what codeclimate does. I would like to do this without using deploy keys or messing with ssh. I notice codeclimate uses the Oauth for github and it takes only one click, but I tested that on my app and I run into the problem I outline in this question : Oauth Cloning on github not working (fatal: Authentication failed)

So what method can I use to clone a private git repo when granted permission and without the user creating deploy keys using my github application?

Upvotes: 2

Views: 1897

Answers (2)

mestachs
mestachs

Reputation: 1889

  1. define your app in github : https://github.com/settings/applications
  2. add a deploy (public) key : http://developer.github.com/v3/repos/keys/#create
  3. tweak your ssh settings to use this associated private key Authenticate Jenkins CI for Github private repository
  4. git clone with specific uri

Upvotes: 1

xero
xero

Reputation: 4319

start by taking a look at the github api:

http://developer.github.com/v3

once authenticated you can view a users repos: http://developer.github.com/v3/repos/

once a repo is selected you can execute "git" calls from the api as well: http://developer.github.com/v3/git/

you can read commits, blobs, trees, branches, tags, refs... pretty much everything.

Upvotes: 0

Related Questions