Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makechrootpkg: preserve SSH_AUTH_SOCK to support ssh operations #69

Closed
wants to merge 1 commit into from
Closed

Conversation

sudoforge
Copy link
Contributor

@sudoforge sudoforge commented Sep 4, 2021

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://[email protected]/"]
  insteadOf = git://github.com/
  insteadOf = [email protected]:
  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.

@sudoforge sudoforge changed the title makechrootpkg: preserve SSH_AUTH_SOCK to support ssh operations aur-chroot: preserve SSH_AUTH_SOCK to support ssh operations Sep 4, 2021
@sudoforge sudoforge changed the title aur-chroot: preserve SSH_AUTH_SOCK to support ssh operations makechrootpkg: preserve SSH_AUTH_SOCK to support ssh operations Sep 4, 2021
@sudoforge
Copy link
Contributor Author

Ignore my title changes, looking at URLs to change the copypasta and somehow mucked it up :)

This commit introduces the preservation of SSH_AUTH_SOCK within the
chroot environment, to support SSH-based operations, such as cloning
repositories via SSH.
klausenbusk
klausenbusk previously approved these changes Oct 9, 2021
Copy link
Member

@klausenbusk klausenbusk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AladW
Copy link

AladW commented Oct 19, 2021

Any chance on this getting merged?

@jelly
Copy link
Member

jelly commented Oct 21, 2021

Merged via be80928

@jelly jelly closed this Oct 21, 2021
@sudoforge
Copy link
Contributor Author

Thanks @jelly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants