nmattia / niv

Easy dependency management for Nix projects
https://github.com/nmattia/niv
MIT License
1.52k stars 74 forks source link

git@github.com: Permission denied (publickey). #342

Open michaelfliegner opened 2 years ago

michaelfliegner commented 2 years ago

mf@Michis:~/nixkell$ niv update Updating all packages Package: nixpkgs Package: gitignore Package: treefmt FATAL: Could not read the output of 'git'. command: git ls-remote git@github.com:numtide/treefmt.git refs/heads/master stdout: stderr: git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

This is a bug. Please create a ticket: https://github.com/nmattia/niv/issues/new Thanks! I'll buy you a beer. FATAL: One or more packages failed to update: treefmt: ExitFailure 1 ERROR: ExitFailure 1

nmattia commented 2 years ago

Hi! I suggest removing your treefmt entry and adding it like this:

$ niv add numtide/treefmt

or adding you SSH key to your SSH agent. Niv is calling git to update the repo and git is expecting an SSH key since the repo is adding with the ssh protocol.