Skip to content

fix: auth, signing, and CLI improvements - #120

Merged
Huerte merged 2 commits into
mainfrom
fix/auth-signing-cli-improvements
Aug 7, 2026
Merged

fix: auth, signing, and CLI improvements#120
Huerte merged 2 commits into
mainfrom
fix/auth-signing-cli-improvements

Conversation

@Huerte

@Huerte Huerte commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactor / internal

Changes

  • ssh_utils.py: gitgo push no longer tries to convert HTTPS to SSH for non-GitHub hosts (Gitea, GitLab, private servers). It checks the remote hostname first. Only github.com gets the SSH conversion. This was the main reason push failed silently on private servers with a different account.
  • ssh_utils.py: added is_agent_loaded(key_path) to check if a key is in the SSH agent. Also added get_remote_host(url) to extract the hostname from any remote URL.
  • ssh_utils.py: ensure_known_host now accepts any hostname, not just github.com. Old ensure_github_known_host kept as an alias so nothing breaks.
  • git_core.py: _get_signing_flags now uses the SSH signing key file from disk directly, and no longer crashes or skips signing based on the SSH agent state.
  • account.py: sanitize_signing_config now checks if the SSH signing key file exists on disk, disabling commit signing gracefully if it is missing to prevent failures.
  • push.py: when gitgo push is run with no arguments, both the default branch and the default message are now shown. Before, only one of them was printed.
  • main.py: removed the letter aliases (-l, -s, -o, -d) from gitgo state. They caused confusion for new users who ran -s expecting something other than save.
  • main.py: rewrote help text for push, sync, link, jump, resolve, undo, and state in plain language.
  • state.py: removed alias resolution logic from state_operation to match the parser change.
  • README.md: updated gitgo push section to document the both-defaults behavior with an example output. Updated gitgo state, sync, link, jump, resolve, and undo sections to match new help text. Removed the aliases note from state docs.

Checklist

  • Tested locally and changes work as expected
  • CHANGELOG.md updated under [Unreleased]
  • README.md updated (if a command was added or changed)
  • Tests added or updated (if applicable)
  • No existing commands are broken (if they are, describe the impact above)

@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.93443% with 27 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pygitgo/auth/ssh_utils.py 72.41% 16 Missing ⚠️
src/pygitgo/commands/state.py 93.93% 10 Missing ⚠️
src/pygitgo/commands/push.py 75.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Huerte
Huerte merged commit 79c2269 into main Aug 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants