Reputation: 51
I figured out how to create repository on Github using PyGIthub by this method:
import sys
from github import Github
g = Github('AryanshMahato', 'GITHUB_PASSWORD')
user = g.get_user()
repo = user.create_repo(folderName)
But in this case PyGithub creates a public repository.
How can I create a private repository using PyGithub?
Upvotes: 1
Views: 914
Reputation: 8558
The official docs: Organization.create_repo
You can set private
parameter to True
repo = user.create_repo(folderName, private=True)
Upvotes: 3