I have a flake with a git+ssh://git@github.com/...
input which points to a private repository. When accessing this from a github action, I am rewriting the ssh access to https via git config: git config --global url."https://git@github.com".insteadOf ssh://git@github.com
which works great for nix flake check
. now I want to bump my flake inputs in the CI with nix flake update
but its not working:
remote: Repository not found.
fatal: repository 'https://github.com/myPrivateRepo/' not found
Why can the nix flake update
command not find the private repo via https when nix flake check
can? Is the git config ssh to https hack not working for nix flake update? The error message is showing the https url so the rewrite appears to have worked. Is nix flake update
missing the access permissions to the repo although nix flake check
has access?
I think nix flake check
git clones all repositories to ~/.cache/nix/gitv3
and I assume that nix flake update
does not invoke git when updating the inputs. Could that be the reason why the git config hack does not work?
I know that the action works when I am specifying the flake input as https. However, in the dev teams that I have been in so far we always used ssh to access our private repos. Does anyone have a different experience?