Skip to content

Instantly share code, notes, and snippets.

@elitak
Last active August 29, 2015 14:04
Show Gist options
  • Save elitak/9e4e2581fa1a516f45e8 to your computer and use it in GitHub Desktop.
Save elitak/9e4e2581fa1a516f45e8 to your computer and use it in GitHub Desktop.
create a repo from cmdline using python github api
#!/usr/bin/env python
from github import Github
import os, sys
g = Github(os.environ.get('GH_USER', 'elitak'), os.environ.get('GH_PASS', ''))
g.get_user().create_repo(name=sys.argv[1])
for repo in g.get_user().get_repos():
print(repo.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment