通过代理访问GitHub存储库

时间:2019-01-04 15:05:01

标签: python github pygithub

我正在尝试从我的Github获取存储库,但出现以下错误:

  HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /tejasshah2227/user/repos (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x0000024E647925F8>, 'Connection to github.com timed out. (connect timeout=15)'))

我想我收到此错误,因为我正在通过代理访问此错误。但是我找不到任何可以帮助我解决此问题的东西。

以下是我的代码:

from github import Github

g = Github("userID", "password")
print(g.get_user())

for repo in g.get_user().get_repos():
      print(repo.name)

此外,当我打印此内容时:

 print(g.get_user())

我得到以下输出:

AuthenticatedUser(login=None)

anyoe可以帮我吗?

0 个答案:

没有答案
相关问题