GNU bug report logs -
#58555
[guile-git] Attempt to use git repositories that support older "dumb" HTTP protocol gives uninformative error message
Previous Next
To reply to this bug, email your comments to 58555 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#58555
; Package
guix
.
(Sun, 16 Oct 2022 00:56:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Wojtek Kosior <koszko <at> koszko.org>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sun, 16 Oct 2022 00:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
I was trying to set up a Guix channel and use it from guix.scm of my
project. I got an error when using `guix shell`
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> Updating channel 'hydrilla-guix' from Git repository at 'https://git.koszko.org/hydrilla-guix-packaging'...
> SWH: revision "7ffa00d8923f518d4d3898d2b9f6673afe204660" originating from https://git.koszko.org/hydrilla-guix-packaging could not be found
> guix shell: warning: revision 7ffa00d8923f518d4d3898d2b9f6673afe204660 of https://git.koszko.org/hydrilla-guix-packaging could not be fetched from Software Heritage
> guix shell: error: failed to load 'guix.scm':
> guix/git.scm:401:19: Git error: invalid content-type: 'text/plain; charset=UTF-8'
I investigated this and found out it's guile-git that fails to HTTP
clone repositories that use the older "dumb" git protocol instead of
the newer "smart" one.
I have since added support for "smart" git protocol in my repository at
git.koszko.org. However, I found a way to reproduce this issue directly
in guile-git. I used more or less the following commands
cd /tmp/
git clone https://gitlab.com/guile-git/guile-git.git
cd guile-git; patch --strip 1 < ~/.config/guix/current/share/guile/site/3.0/gnu/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch
guix shell -f guix.scm nss-certs guile libgit2 guile-bytestructures -- guile -c '(use-modules (git bindings) (git clone)) (libgit2-init!) (clone "https://git.nicksphere.ch/calcurse" "/tmp/gitclonetest")'
Nick's repo that I am using here only supports the dumb protocol. Hence
the following error
> Backtrace:
> In ice-9/boot-9.scm:
> 1752:10 7 (with-exception-handler _ _ #:unwind? _ # _)
> In unknown file:
> 6 (apply-smob/0 #<thunk 7fc3b96122e0>)
> In ice-9/boot-9.scm:
> 724:2 5 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
> In ice-9/eval.scm:
> 619:8 4 (_ #(#(#<directory (guile-user) 7fc3b9617c80>)))
> In ice-9/command-line.scm:
> 185:19 3 (_ #<input: string 7fc3b9611850>)
> In unknown file:
> 2 (eval (clone "https://git.nicksphere.ch/calcurse" "/…") #)
> In git/clone.scm:
> 46:8 1 (_ _ _ _)
> In git/bindings.scm:
> 77:2 0 (raise-git-error _)
>
> git/bindings.scm:77:2: In procedure raise-git-error:
> Throw to key `git-error' with args `(#<<git-error> code: -1 message: "invalid content-type: 'text/plain; charset=UTF-8'" class: 34>)'.
The expected behavior is that instead the user gets a meaningful
message, e.g. "Repository at <URL> could not be used because it doesn't
support the newer \"smart\" git HTTP protocol. Please ask the
repository owner to add support for that protocol".
I didn't see any mailing list for guile-git and I noticed most recent
commits in guile-git are from Guix maintainer anyway so I decided to
just submit to Guix bug mailing list. I hope I'm not doing something
horribly wrong here :)
Best,
Wojtek
-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A
Meet Kraków saints! #35: blessed Józef Innocenty Guz
Poznaj świętych krakowskich! #35: błogosławiony Józef Innocenty Guz
https://pl.wikipedia.org/wiki/Józef_Innocenty_Guz
-- (sig_end)
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#58555
; Package
guix
.
(Sun, 16 Oct 2022 08:57:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 58555 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 15-10-2022 17:08, Wojtek Kosior via Bug reports for GNU Guix wrote:
> Hello,
>
> I was trying to set up a Guix channel and use it from guix.scm of my
> project. I got an error when using `guix shell`
>
>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>> Updating channel 'hydrilla-guix' from Git repository at 'https://git.koszko.org/hydrilla-guix-packaging'...
>> SWH: revision "7ffa00d8923f518d4d3898d2b9f6673afe204660" originating from https://git.koszko.org/hydrilla-guix-packaging could not be found
>> guix shell: warning: revision 7ffa00d8923f518d4d3898d2b9f6673afe204660 of https://git.koszko.org/hydrilla-guix-packaging could not be fetched from Software Heritage
>> guix shell: error: failed to load 'guix.scm':
>> guix/git.scm:401:19: Git error: invalid content-type: 'text/plain; charset=UTF-8'
>
> I investigated this and found out it's guile-git that fails to HTTP
> clone repositories that use the older "dumb" git protocol instead of
> the newer "smart" one.
> [...]
This is a limitation of the libgit2 library that is used by guile-git:
<https://github.com/libgit2/libgit2/issues/4652#issuecomment-390903142>.
Currently there don't appear to be any plans upstream for supporting the
'dumb' protocol. If you would like support for the 'dumb' protocol,
you'll need to contact libgit2, and probably write the patch yourself.
> [...]
> Nick's repo that I am using here only supports the dumb protocol. Hence
> the following error
>
>> Backtrace:
>> In ice-9/boot-9.scm:
>> 1752:10 7 (with-exception-handler _ _ #:unwind? _ # _)
>> In unknown file:
>> 6 (apply-smob/0 #<thunk 7fc3b96122e0>)
>> In ice-9/boot-9.scm:
>> 724:2 5 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
>> In ice-9/eval.scm:
>> 619:8 4 (_ #(#(#<directory (guile-user) 7fc3b9617c80>)))
>> In ice-9/command-line.scm:
>> 185:19 3 (_ #<input: string 7fc3b9611850>)
>> In unknown file:
>> 2 (eval (clone "https://git.nicksphere.ch/calcurse" "/…") #)
>> In git/clone.scm:
>> 46:8 1 (_ _ _ _)
>> In git/bindings.scm:
>> 77:2 0 (raise-git-error _)
>>
>> git/bindings.scm:77:2: In procedure raise-git-error:
>> Throw to key `git-error' with args `(#<<git-error> code: -1 message: "invalid content-type: 'text/plain; charset=UTF-8'" class: 34>)'.
>
> The expected behavior is that instead the user gets a meaningful
> message, e.g. "Repository at <URL> could not be used because it doesn't
> support the newer \"smart\" git HTTP protocol. Please ask the
> repository owner to add support for that protocol".
>
> I didn't see any mailing list for guile-git and I noticed most recent
> commits in guile-git are from Guix maintainer anyway so I decided to
> just submit to Guix bug mailing list. I hope I'm not doing something
> horribly wrong here :)
It uses GitLab's issue tracker. I've added a link at
<https://gitlab.com/guile-git/guile-git/-/issues/28>.
Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
This bug report was last modified 2 years and 149 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.