PyGithub icon indicating copy to clipboard operation
PyGithub copied to clipboard

Demo example fails

Open ikamensh opened this issue 4 years ago • 1 comments

Following fails:

from github import Github

# Github Enterprise with custom hostname
g = Github(
    base_url="https://github.boschdevcloud.com/api/v3",
    login_or_token="MY_TOKEN",
)

u = g.get_user()
print(u)  # AuthenticatedUser(login=None)

for repo in u.get_repos():  # socket.gaierror: [Errno 8] nodename nor servname provided, or not known
    print(repo.name)

I'm not understanding why this fails; but even if I'm doing something wrong error message could be improved.

ikamensh avatar Apr 19 '22 17:04 ikamensh

I've verified that my token has full repo permissions and user permissions.

ikamensh avatar Apr 19 '22 17:04 ikamensh