makechrootpkg: preserve SSH_AUTH_SOCK to support ssh operations
Created by: sudoforge
makechrootpkg: preserve SSH_AUTH_SOCK to support ssh operations
This commit introduces the preservation of SSH_AUTH_SOCK within the
chroot environment, to support SSH-based operations, such as cloning
repositories via SSH.
Without this patch, users who are performing operations over SSH will experience failures. This can cause unexpected results for users who are, for example, building packages using makechrootpkg
, and force all connections to the specified remote(s) ovr SSH, with a stanza similar to below in their Git configuration:
[url "ssh://git@github.com/"]
insteadOf = git://github.com/
insteadOf = git@github.com:
insteadOf = http://github.com/
insteadOf = https://github.com/
Yes, users could be told to update their sudo
configuration to preserve the environment variable, however, I find that requiring users to update their configuration in order to work with this tool to be less than desirable.