GNU bug report logs - #39511
github tokens being deprecated

Previous Next

Package: guix;

Reported by: Matt Wette <matt.wette <at> gmail.com>

Date: Sat, 8 Feb 2020 14:51:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39511 in the body.
You can then email your comments to 39511 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#39511; Package guix. (Sat, 08 Feb 2020 14:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matt Wette <matt.wette <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 08 Feb 2020 14:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matt Wette <matt.wette <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: github tokens being deprecated
Date: Sat, 8 Feb 2020 06:50:31 -0800
$ guix refresh
...
Backtrace:
          12 (apply-smob/1 #<catch-closure 7f0c2c0c66c0>)
In ice-9/boot-9.scm:
    705:2 11 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
In ice-9/eval.scm:
    619:8 10 (_ #(#(#<directory (guile-user) 7f0c2bd4e140>)))
In guix/ui.scm:
  1808:12  9 (run-guix-command _ . _)
In ice-9/boot-9.scm:
    829:9  8 (catch _ _ #<procedure 7f0c2bcbd3b8 at guix/ui.scm:652?> ?)
    829:9  7 (catch _ _ #<procedure 7f0c2bcbd3d0 at guix/ui.scm:775?> ?)
In guix/store.scm:
   625:10  6 (call-with-store _)
  1848:24  5 (run-with-store #<store-connection 256.99 7f0c1fd586c0> ?)
In guix/scripts/refresh.scm:
   541:14  4 (_ _)
In srfi/srfi-1.scm:
    640:9  3 (for-each #<procedure 7f0c2abf1d00 at guix/scripts/ref?> ?)
In guix/scripts/refresh.scm:
    344:2  2 (check-for-package-update #<package sbcl-stumpwm-with-?> ?)
In guix/import/github.scm:
   237:25  1 (latest-release #<package sbcl-stumpwm-with-slynk <at> 19.11?>)
In unknown file:
           0 (scm-error misc-error #f "~A" ("Error downloading rel?") ?)

ERROR: In procedure scm-error:
Error downloading release information through the GitHub
API. This may be fixed by using an access token and setting the environment
variable GUIX_GITHUB_TOKEN, for instance one procured from
https://github.com/settings/tokens


after github token acquired:

$ guix refresh
...
guix refresh: warning: input 'Carp' of perl-xml-compile is in Perl core
gnu/packages/xml.scm:1113:13: tinyxml2 would be upgraded from 7.0.1 to 7.1.0
following redirection to 
`https://api.github.com/repositories/7715820/releases?access_token=728ec76dc9ea4344b57ba6be86674ed9e0135090'...
gnu/packages/xdisorg.scm:1731:13: python-pyperclip would be upgraded 
from 1.6.4 to 1.7.0


and then an email from github.com:

Hi @mwette,

On February 8th, 2020 at 14:37 (UTC) your personal access token (guix/bluefin) using GNU Guile was used as part of a query parameter to access an endpoint through the GitHub API:

https://api.github.com/repositories/32202720/releases

Please use the Authorization HTTP header instead, as using the `access_token` query parameter is deprecated and will be removed July 1st, 2020.

Depending on your API usage, we'll be sending you this email reminder once every 3 days for each token and User-Agent used in API calls made on your behalf.
Just one URL that was accessed with a token and User-Agent combination will be listed in the email reminder, not all.

Visithttps://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters  for more information.

Thanks,
The GitHub Team








Information forwarded to bug-guix <at> gnu.org:
bug#39511; Package guix. (Sat, 15 Feb 2020 18:45:01 GMT) Full text and rfc822 format available.

Message #8 received at 39511 <at> debbugs.gnu.org (full text, mbox):

From: Matt Wette <matt.wette <at> gmail.com>
To: 39511 <at> debbugs.gnu.org
Subject: github auth
Date: Sat, 15 Feb 2020 10:43:56 -0800
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
     ;; <https://developer.github.com/v3/>.
     `((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.





Information forwarded to bug-guix <at> gnu.org:
bug#39511; Package guix. (Sat, 15 Feb 2020 23:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 39511 <at> debbugs.gnu.org (full text, mbox):

From: Matt Wette <matt.wette <at> gmail.com>
To: 39511 <at> debbugs.gnu.org
Subject: udpate
Date: Sat, 15 Feb 2020 15:02:40 -0800
oops:  `(Auth ...) => (list `(Auth...))





Information forwarded to bug-guix <at> gnu.org:
bug#39511; Package guix. (Sat, 22 Feb 2020 10:53:02 GMT) Full text and rfc822 format available.

Message #14 received at 39511 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Matt Wette <matt.wette <at> gmail.com>
Cc: 39511 <at> debbugs.gnu.org
Subject: Re: bug#39511: github auth
Date: Sat, 22 Feb 2020 11:52:23 +0100
Hi Matt,

Matt Wette <matt.wette <at> gmail.com> skribis:

> I have not gotten into testing, but according to email and references
> provided previously the patch below might work.

I’ve applied the patch on your behalf, thank you!

Ludo’.





Information forwarded to bug-guix <at> gnu.org:
bug#39511; Package guix. (Sat, 22 Feb 2020 14:40:01 GMT) Full text and rfc822 format available.

Message #17 received at 39511 <at> debbugs.gnu.org (full text, mbox):

From: Matt Wette <matt.wette <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 39511 <at> debbugs.gnu.org
Subject: Re: bug#39511: github auth
Date: Sat, 22 Feb 2020 06:39:30 -0800
On 2/22/20 2:52 AM, Ludovic Courtès wrote:
> Hi Matt,
>
> Matt Wette <matt.wette <at> gmail.com> skribis:
>
>> I have not gotten into testing, but according to email and references
>> provided previously the patch below might work.
> I’ve applied the patch on your behalf, thank you!
>
> Ludo’.
>

much appreciated

Matt




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Mon, 05 Oct 2020 02:57:01 GMT) Full text and rfc822 format available.

Notification sent to Matt Wette <matt.wette <at> gmail.com>:
bug acknowledged by developer. (Mon, 05 Oct 2020 02:57:01 GMT) Full text and rfc822 format available.

Message #22 received at 39511-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 39511-done <at> debbugs.gnu.org, Matt Wette <matt.wette <at> gmail.com>
Subject: Re: bug#39511: github auth
Date: Sun, 04 Oct 2020 22:56:33 -0400
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi Matt,
>
> Matt Wette <matt.wette <at> gmail.com> skribis:
>
>> I have not gotten into testing, but according to email and references
>> provided previously the patch below might work.
>
> I’ve applied the patch on your behalf, thank you!
>
> Ludo’.

Closing, thanks!

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 02 Nov 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 147 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.