Thanks Liliana for the reply, Liliana Marie Prikler writes:
> Am Freitag, dem 04.03.2022 um 09:34 +0000 schrieb Phil: > Again I wonder what the introduction of a new record type solves here. > Wouldn't it be easier to just adapt git-fetch to handle that edge case > and use normal git-references? Origin methods have network access, so > you can pretty much do whatever. > > Cheers The problem with an origin record using git-fetch is that it doesn't seem to work for key-authenticated repos using SSH. If I try to change the git-checkout for the standard git-fetch incantation: Original: (git-checkout (url "ssh://git@bitbucket:7999/foo/bar.git") (commit commit-production))) Proposed: (source (origin (method git-fetch) (uri (git-reference (url "ssh://git@bitbucket:7999/foo/bar.git") (commit commit-production))) (sha256 (base32 "0s9dpj0jdkqcg552f00jhd722czji4pffabmpys5pgi6djckq4f4")))) This fails because git-fetch is unable to use ssh because it seems to run inside a container? Initialized empty Git repository in /gnu/store/dbcl57jcrvaavjrj8qwpwskl7sfpzqb4-git-checkout/.git/ error: cannot run ssh: No such file or directory fatal: unable to fork Failed to do a shallow fetch; retrying a full fetch... error: cannot run ssh: No such file or directory fatal: unable to fork Even if it did find ssh, it would not have access from the daemon to the SSH Agent environment variables setup by the user to allow access to the SSH Key. This is covered here I think, and a patch was proposed, but it was dropped in favour for the original solution above in the original thread: http://issues.guix.gnu.org/issue/31285 I did think about perhaps resurrecting the proposed "git-fetch/impure" as shown in the patch of guix-download.scm in the link immediately above, but I was hoping for a quicker win with duplicating the record - alas that has it's own significant limitations tho. If I'm missing another trick with git-fetch I'd glady be proved wrong! :-) Cheers