I’m trying to use a private repo, let’s say github.com/foo/bar
, as an input to a Nix flake.
Setting a github access token in .config/nix/nix.conf
:
access-tokens = github.com=ghp_...
Works as normal with github:foo/bar
as a flake input.
But I’d rather rely on my existing ssh authentication rather than having to create and maintain access tokens.
git+ssh://git@github.com/foo/bar.git
, as suggested in:
- Nix Flakes and Private Repositories - #6 by jorsn
- Nix Flake and private repository (again) - #11 by olmokramer
Doesn’t work:
$ nix build
fetching Git repository 'ssh://git@github.com/RyanGibb/cv.git'fatal: couldn't find remote ref refs/heads/master
error: program 'git' failed with exit code 128
Any suggestions?