help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't serve a custom channel on a HTTPS repository


From: EuAndreh
Subject: Can't serve a custom channel on a HTTPS repository
Date: Mon, 26 Jul 2021 14:36:24 -0300

Hi!

I have the following "channels.scm" file:

  (cons*
   (channel
    (name 'xyz-euandreh)
    (url "git://euandreh.xyz/package-repository.git")
    (branch "main")
    (introduction
     (make-channel-introduction
      "d749e053e6db365069cb9b2ef47a78b06f9e7361"
      (openpgp-fingerprint
       "5BDA E9B8 B2F6 C6BC BB0D  6CE5 81F9 0EC3 CD35 6060"))))
   %default-channels)

And I'm using "guix time-machine" with it:

  $ guix time-machine -C channels.scm -- environment --ad-hoc hello

This works very well this way.  However if I change the Git URL to HTTPS, it
stops working:

  diff --git a/channels.scm b/channels.scm
  --- a/channels.scm
  +++ b/channels.scm
  @@ -1,7 +1,7 @@
   (cons*
    (channel
     (name 'xyz-euandreh)
  -  (url "git://euandreh.xyz/package-repository.git")
  +  (url "https://euandreh.xyz/package-repository.git";)
     (branch "main")
     (introduction
      (make-channel-introduction

  $ guix time-machine -C channels.scm -- environment --ad-hoc hello
  guix time-machine: error: Git error: invalid content-type: 
'application/octet-stream'

The server is configured to serve over HTTPS and the Git protocol, and I can
successfully clone either way:

  $ cd /tmp/
  $ git clone git://euandreh.xyz/package-repository.git   git
  # works
  $ git clone https://euandreh.xyz/package-repository.git https
  # also works

I see that the "%default-channel-url" [0] Guile variable points to a bare HTTPS
Git repository, and that the "Content-Type" header of those files is also
"application/octet-stream":

  (define %default-channel-url
    ;; URL of the default 'guix' channel.
    "https://git.savannah.gnu.org/git/guix.git";)

It seems that I also need some kind of extra HTTPS header configuration.  Is
this an issue with the "guile-git" library?  Does Savannah has any special
treatment of HTTPS repositories, or guile-git requests?  What configuration I'm
missing from the server to be able to serve over HTTPS only?

[0]: 
https://git.savannah.gnu.org/cgit/guix.git/tree/guix/channels.scm?id=68ce40cad7782e75d665283fbe67b330d9a6fdcd#n175



reply via email to

[Prev in Thread] Current Thread [Next in Thread]