Skip to content
Snippets Groups Projects

makechrootpkg: preserve SSH_AUTH_SOCK to support ssh operations

Closed Kristian Klausen requested to merge github/fork/sudoforge/master into master

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.

Merge request reports

Closed by avatar (Feb 21, 2025 4:11am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading