Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 3.05 KB

2021-06-18.18.issue.open.md

File metadata and controls

55 lines (38 loc) · 3.05 KB

#18 Issue open: Issue on macOS

nicolas opened issue at 2021-06-18 14:39:

I tried using gh2md on the computer here at work (running macOS 11.1) and all I get is this:

nicolas@computer ~ % gh2md user/project issues.md --login user
Github password for user :
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/gh2md", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gh2md/gh2md.py", line 41, in main
    fetch_repo_and_export_to_markdown(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gh2md/gh2md.py", line 139, in fetch_repo_and_export_to_markdown
    repo, github_api = get_github_repo(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gh2md/gh2md.py", line 286, in get_github_repo
    return gh_owner.get_repo(repo_name), gh
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/github/NamedUser.py", line 545, in get_repo
    headers, data = self._requester.requestJsonAndCheck(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/github/Requester.py", line 378, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-repository"}

python --version is Python 2.7.16, python3 --version is Python 3.9.5.

Any idea of what is happening? Thanks!

@nclm hey, sorry for slow response here.

I need to look at this more but I was able to reproduce it on my account by trying to clone a private repository using password login. I'm pretty sure this is because it doesn't handle 2FA login properly right now, and so probably I get the 404 because I'm not authenticated.

Do you have 2FA on your account? If so you can pass in an access token using one of:

  • The --token flag.
  • A GITHUB_ACCESS_TOKEN environment variable.
  • An API token stored in ~/.github-token.

There are a couple of things I'll look at here:

  1. 2FA login support
  2. Better error handling to make it clear what's happening

If this is a public repo or you don't have 2FA on your account then let me know.


[Export of Github issue for mattduck/gh2md. Generated on 2021.06.27 at 12:04:30.]