Skip to content

No such file or directory: '/Users/my_username/.netrc' #18

Description

@hugovk

After installing on Python 3.12.1 on macOS:

❯ watch_gha_runs
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/bin/watch_gha_runs", line 5, in <module>
    from watchgha.watch_runs import main
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/watchgha/watch_runs.py", line 24, in <module>
    from .http_help import get_data
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/watchgha/http_help.py", line 89, in <module>
    _get_data = Http().get_data
                ^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/watchgha/http_help.py", line 42, in __init__
    self.auth = httpx.NetRCAuth()
                ^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/httpx/_auth.py", line 154, in __init__
    self._netrc_info = netrc.netrc(file)
                       ^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/netrc.py", line 74, in __init__
    with open(file, encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/hugo/.netrc'

The README's installation seems to mention in passing:

You can authenticate against GitHub if needed using either an entry in your .netrc file, or by setting the GITHUB_TOKEN environment variable.

Is there some more set up that's needed and can be explicitly called out?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions