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

Use ssh-agent for distributed builds #11987

Open
2 tasks done
fricklerhandwerk opened this issue Nov 29, 2024 · 0 comments
Open
2 tasks done

Use ssh-agent for distributed builds #11987

fricklerhandwerk opened this issue Nov 29, 2024 · 0 comments
Labels
feature Feature request or proposal remote build The SSH store, ssh:, ssh-ng:, ... (split from protocol label 2024-07)

Comments

@fricklerhandwerk
Copy link
Contributor

Is your feature request related to a problem?

I may be holding it wrong, but:

Running distributed builds with an encrypted private key seems to be impossible currently. Nix apparently takes the key file verbatim and doesn't ask the agent, and SSH's password prompt fails with

debug1: read_passphrase: can't open /dev/tty: No such device or address

Related: #5133

Proposed solution

What should be possible is adding an encrypted key to ssh-agent and sharing the agent's socket with the root user. Then Nix must consult the agent to unlock the key.

Alternative solutions

As a workaround, do all sorts of stuff where keeping an unecrypted key around in /root/.ssh is unproblematic.

Additional context

Getting remote builds to work is a problem I had since my beginnings of using Nix, and I have strong anecdotal evidence that it's still a very important feature for new users.

https://nix.dev/tutorials/nixos/distributed-builds-setup

Checklist


Add 👍 to issues you find important.

@fricklerhandwerk fricklerhandwerk added feature Feature request or proposal remote build The SSH store, ssh:, ssh-ng:, ... (split from protocol label 2024-07) labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal remote build The SSH store, ssh:, ssh-ng:, ... (split from protocol label 2024-07)
Projects
None yet
Development

No branches or pull requests

1 participant