Pass ssh-agent variables by default #3572
Merged
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+ssh
dependencies or even directssh
command 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_SOCK
but alsoSSH_AGENT_PID
with 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/changelog
folder