如何使用PyGithub在Github中创建私有存储库

2024-05-23 17:36:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我通过以下方法了解了如何使用PyGIthub在Github上创建存储库:

import sys
from github import Github

g = Github('AryanshMahato', 'GITHUB_PASSWORD')

user = g.get_user()
repo = user.create_repo(folderName)

但在本例中,PyGithub创建了一个公共存储库

如何使用PyGithub创建私有存储库


Tags: 方法fromimportgithubgetcreatesysrepo