Pygithub: Clone repository

Created on 27 Oct 2018  路  7Comments  路  Source: PyGithub/PyGithub

I couldn't find this in the examples (or I overlooked it), but I can't see if it is possible to clone the repository using PyGithub.

Most helpful comment

First question, why? What's the use case for?

Those questions (and the solution) are answered here:
https://stackoverflow.com/q/61544909/667301

All 7 comments

Don't think it was provided by Github REST API. You will need a python git client.

Alrighty, Thank you!

I went the route of just using python to execute git clone with system.os("..") :)

Will there be an option within pygithub to eventually do this?

I don't think so , the PYGithub API seems to be used only to control the remote and not work locally.

I find myself with a similar question... I work for a company that uses GitHub as their online source repository.

This means I work with two Github repositories:

  • One repo under our shared corporate username (thousandeyes)
  • I frequently clone a thousandeyes repo to mpennington-te (my github account)

I have to clone repos like this practically every day. It would be quite useful to have a github API to do this.

First question, why? What's the use case for?

If you simply want to clone them locally, why not just write a shell script or use GitPython

First question, why? What's the use case for?

Those questions (and the solution) are answered here:
https://stackoverflow.com/q/61544909/667301

Was this page helpful?
0 / 5 - 0 ratings