from github import Github
g = Github("user", "password")
g = Github("access_token")
g = Github(base_url="https://{hostname}/api/v3", login_or_token="access_token")
for repo in g.get_user().get_repos():
print(repo.name)
我遇到以下错误:
ConnectionError: HTTPSConnectionPool(host='%7bhostname%7d', port=443): Max retries exceeded with url: /api/v3/user/repos (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001C42D1A3B48>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))