all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Phil <phil@beadling.co.uk>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Help to workaround libgit2 fetch refs issue
Date: Sat, 05 Mar 2022 11:57:39 +0000	[thread overview]
Message-ID: <8735jwharw.fsf@beadling.co.uk> (raw)
In-Reply-To: <ad59e98f2f95086da1e9788804193df76992cdad.camel@gmail.com>

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


  reply	other threads:[~2022-03-05 11:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 18:31 Help to workaround libgit2 fetch refs issue Phil
2022-03-02 21:06 ` Liliana Marie Prikler
2022-03-03 18:20   ` Phil
2022-03-04  9:34     ` Phil
2022-03-04 17:43       ` Liliana Marie Prikler
2022-03-05 11:57         ` Phil [this message]
2022-04-30  9:28           ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735jwharw.fsf@beadling.co.uk \
    --to=phil@beadling.co.uk \
    --cc=guix-devel@gnu.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.