对于Github Enterprise:
from github import Github
g = Github(base_url="https://your_host_name/api/v3", login_or_token="your_access_token")
org = g.get_organization("your_org")
repo = org.get_repo(repo_name) # getting the repo
print(repo)
对于Github:
from github import Github
g = Github(username,password))
repo = g.get_repo(repo_name) # getting the repo
print(repo)