如何用PyGithub创建一个新的存储库 [英] How to create a new repository with PyGithub

查看:112
本文介绍了如何用PyGithub创建一个新的存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Github上使用PyGithub创建新的存储库?
特别是我想知道如何使用 create_repo 方法?如何生成 AuthenticatedUser

解决方案

是以下内容:

$ g $ g $ g $ g $ g $ g $ g $ g $ g $ g $ g $ g $ g $ g $ user.create_repo(full_name)


How can I create a new repository with PyGithub on Github? In particular I like to know how to use the create_repo method? How do I generate a AuthenticatedUser?

解决方案

The solution to my question is the following

g = Github(token)
user = g.get_user()
repo = user.create_repo(full_name)

这篇关于如何用PyGithub创建一个新的存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆