[Nix-dev] SSH-keys in fetchgit

Andreas Herrmann andreash87 at gmx.ch
Tue Jul 15 12:09:22 CEST 2014


Dear Nix-ers,

I am using Nix to manage and deploy my own work projects, which do depend
on each other. These projects, however, are not open source, so their
sources are not publicly available on the internet.

I was wondering if it was possible in some way to configure Nix (or
fetchgit) to use ssh keys when fetching sources from non-public
repositories. (E.g. private repositories on bitbucket with deployment keys)

Please note, that I am using Nix/Nixpkgs in single-user mode on a host OS
(openSUSE, and CentOS).

I tried adding my deployment keys to the system-wide ssh config in
`/etc/ssh/`, and the per user config `~/.ssh/`, both to no avail. Also, at
least on the CentOS machine I do not have root access. So, whatever
solution there is will have to work from within my home directory.

My current (hacky) solution is to hard code the path to the repository in
the `src` attribute of the derivation in the form `url =
file:///home/user/src/project;`. And then ship it to the CentOS machine by
using `nix-store --export`, and `nix-store --import`. However, this is
hardly a satisfactory solution, and as you can imagine it doesn't scale
very well with the number of packages.

Best,

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140715/e8690c9d/attachment.html 


More information about the nix-dev mailing list