feat: support SSH IdentityAgent config directive#1630
Merged
DonDebonair merged 4 commits intopyinfra-dev:3.xfrom Apr 19, 2026
Merged
feat: support SSH IdentityAgent config directive#1630DonDebonair merged 4 commits intopyinfra-dev:3.xfrom
DonDebonair merged 4 commits intopyinfra-dev:3.xfrom
Conversation
Honor the IdentityAgent field from ~/.ssh/config so that external SSH agents (e.g. 1Password) work transparently with pyinfra. Closes pyinfra-dev#1592
|
Installed the fix with Works perfect with the 1password ssh-agent on macOS. |
Resolves conflict in src/pyinfra/connectors/ssh.py caused by this branch adding ``import os`` (needed to honor the SSH IdentityAgent config directive by temporarily overriding SSH_AUTH_SOCK) while 3.x removed the now-unused ``import shlex``. Keep both changes: take the new ``os`` import from this branch, drop ``shlex`` as 3.x did.
Collaborator
Author
|
@Fizzadar could be nice to merge this one |
DonDebonair
reviewed
Apr 19, 2026
Collaborator
|
Good PR. Left 1 nitpick comment. Otherwise good to merge. |
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.
Honor the IdentityAgent field from ~/.ssh/config so that external SSH agents (e.g. 1Password) work transparently with pyinfra.
Closes #1592
3.xat this time)scripts/dev-test.sh)scripts/dev-lint.sh)