fix: prevent ssh hang during login and improve browser fallback#72
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Overview
This fixes a bug where
gitgo user loginwould freeze forever if the user's ssh agent wasn't running. the ssh command was waiting for a passphrase, but because we capture the output, the prompt was invisible. i also fixed the browser auto-open so it prints the github url if the browser fails to open.Changes
ssh_utils.py: addedBatchMode=yes, timeouts, andstdin=DEVNULLto the ssh connection checks so they fail fast instead of hanging.ssh_utils.py: updated theopen_github_settingsfunction to catch errors and always print the target url as a fallback.manager.py: changed the login flow so the browser opens instantly, and improved the error messages if login fails.How to Test
pip install -e ".[dev]"gitgo user loginChecklist
CHANGELOG.mdunder the[Unreleased]sectionREADME.md(if I added or changed a command)