-
Notifications
You must be signed in to change notification settings - Fork 72
Description
When trying to log in with gitfive login on an account protected by 2FA, the CLI crashes with the following traceback:
[*] 2FA Traceback (most recent call last): File "/home/<user>/.local/share/pipx/venvs/gitfive/bin/gitfive", line 7, in <module> sys.exit(main()) File ".../gitfive/gitfive.py", line 17, in main parse_args() File ".../gitfive/lib/cli.py", line 46, in parse_args trio.run(login_mod.check_and_login, args.clean) File ".../trio/_core/_run.py", line 2306, in run raise runner.main_task_outcome.error File ".../gitfive/modules/login_mod.py", line 37, in check_and_login await creds.login() File ".../gitfive/lib/objects.py", line 310, in login msg = body.find("form", {"action": "/sessions/two-factor"}).find("div", {"class": "mt-3"}).text.strip().split("\n")[0] AttributeError: 'NoneType' object has no attribute 'text'
To Reproduce
Install GitFive from GitHub (latest commit).
Run gitfive login with a GitHub account that has 2FA enabled.
Enter username & password.
CLI crashes right after the [*] 2FA line.
Expected behavior
GitFive should correctly handle GitHub’s current 2FA page (either TOTP or passkey/push) and continue the login flow instead of crashing.