input-output-hk/stack2nix

fatal: Could not read from remote repository.

Closed this issue · 4 comments

Using stack2nix . > foo.bar gives

+ cabal2nix --subpath . --system x86_64-darwin --compiler ghc-8.4.3 cabal://zstd-0.1.0.0
+ cabal2nix --subpath . --system x86_64-darwin --compiler ghc-8.4.3 cabal://ztail-1.2.0.2


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.
Enter passphrase for key '/Users/dominic.steinitz/.ssh/id_rsa': 
Enter passphrase for key '/Users/dominic.steinitz/.ssh/id_rsa': 
Enter passphrase for key '/Users/dominic.steinitz/.ssh/id_rsa': 
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.
Enter passphrase for key '/Users/dominic.steinitz/.ssh/id_rsa': 
Enter passphrase for key '/Users/dominic.steinitz/.ssh/id_rsa': 
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.
Unable to checkout fcfa557328d93866127ad285f701c4093f81b884 from git@github.com:haskell-numerics/hmatrix-sundials.git.
abort: repository git@github.com:haskell-numerics/hmatrix-sundials.git not found!
svn: E205000: Syntax error in revision argument 'fcfa557328d93866127ad285f701c4093f81b884'
failed to open trace file: [Errno 2] No such file or directory: '/homeless-shelter/.bzr.log'
bzr: ERROR: Unsupported protocol for url "git@github.com:haskell-numerics/hmatrix-sundials.git"
stack2nix: user error (Failed to fetch source. Does this source exist? Source {sourceUrl = "git@github.com:haskell-numerics/hmatrix-sundials.git", sourceRevision = "fcfa557328d93866127ad285f701c4093f81b884", sourceHash = UnknownHash, sourceCabalDir = "."})

You can't use ssh access with git.

@domenkozar You mean in order to use stack2nix or in general? I use it all the time in general so I am confused.

With stack2nix, because it's automatic and it will want to ask for your password. You could use ssh agent to persist authentication, but generates Nix expressions won't work anyway (they don't have access to your private key).

Ok that worked although I am surprised that the resulting output contains a derivation for every known package. Thanks 👍