From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Wette Subject: bug#39511: github auth Date: Sat, 15 Feb 2020 10:43:56 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:60912) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j32R5-0007K1-5c for bug-guix@gnu.org; Sat, 15 Feb 2020 13:45:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j32R4-0001vE-5n for bug-guix@gnu.org; Sat, 15 Feb 2020 13:45:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58626) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j32R4-0001v6-2P for bug-guix@gnu.org; Sat, 15 Feb 2020 13:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j32R4-0001sh-0w for bug-guix@gnu.org; Sat, 15 Feb 2020 13:45:02 -0500 In-Reply-To: Sender: "Debbugs-submit" Resent-Message-ID: Content-Language: en-US List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: 39511@debbugs.gnu.org I have not gotten into testing, but according to email and references provided previously the patch below might work. --- github.scm-orig    2020-02-15 10:32:52.209481329 -0800 +++ github.scm    2020-02-15 10:40:36.958144491 -0800 @@ -154,14 +154,12 @@      ;; Ask for version 3 of the API as suggested at      ;; .      `((Accept . "application/vnd.github.v3+json") +      ,@(if (%github-token) +        `(Authorization . ,(string-append "token " (%github-token))) +        '())        (user-agent . "GNU Guile"))) -  (define (decorate url) -    (if (%github-token) -        (string-append url "?access_token=" (%github-token)) -        url)) - -  (match (json-fetch (decorate release-url) #:headers headers) +  (match (json-fetch release-url #:headers headers)      (#()       ;; We got the empty list, presumably because the user didn't use GitHub's       ;; "release" mechanism, but hopefully they did use Git tags.