Pass ssh-agent variables by default#3572
Merged
gaborbernat merged 1 commit intotox-dev:mainfrom Jul 31, 2025
Merged
Conversation
315e69a to
d024559
Compare
gaborbernat
approved these changes
Jul 31, 2025
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.
A tox environment may have
git+sshdependencies or even directsshcommand calls. In non-interactive shell sessions (such as in CI tasks) the identity is often available only through ssh-agent to keep the private key in secret or because there is no way to enter the passphrase. SSH client is communicating with ssh-agent session through the socket opened onSSH_AUTH_SOCK. This variable must be passed in the tox environment to SSH client could work with the agent session from there. If there is an active agent in a shell session, it most likely implies that it will be used for every SSH client connection even in tox environments.ssh-agent evaluation exports not only
SSH_AUTH_SOCKbut alsoSSH_AGENT_PIDwith agent's process identifier. This variable is necessary to control the agent which also may be done from within a tox environment.I do not know if either ssh-agent is available on Windows or it works the same way as it does on Linux/MacOS, so I do not pass the variables.
tox -e fix)docs/changelogfolder