Coder Social home page Coder Social logo

ghub's Introduction

A Git Porcelain inside Emacs

homepage | manual | faq | wiki | mastodon


Magit is an interface to the version control system Git, implemented as an Emacs package. Magit aspires to be a complete Git porcelain. While we cannot (yet) claim that Magit wraps and improves upon each and every Git command, it is complete enough to allow even experienced Git users to perform almost all of their daily version control tasks directly from within Emacs. While many fine Git clients exist, only Magit and Git itself deserve to be called porcelains.


Keeping its users this excited is a lot of work . If Magit makes you
more productive too, then please consider making a donation.
Thank you! — Jonas Bernoulli

Sponsor my work using Github Sponsors    Sponsor my work using Liberapay
Sponsor my work using Opencollective    Sponsor my work using PayPal

Some alternative donation methods are available.

Getting Started

If you are new to Magit, then either one of the following two articles should help understanding how it differs from other Git clients.

If you are completely new to Magit, then this article is a good visual introduction.

Almost everything that you see in Magit can be acted on by pressing some key, but that's not obvious from just seeing how Magit looks. The screenshots and accompanying text of this article explain how to perform a variety of actions on Magit's output.

Magit differs significantly from other Git interfaces, and its advantages are not immediately obvious simply from looking at a few screenshots as presented in the preceding article.

This article discusses Magit's properties in somewhat more abstract terms.

Video introductions

If you prefer video introductions, head over to that page, where find a collection of such introductions and other videos about Magit, by various creators.


Support and Contributing

Magit has many users and very few maintainers, so we kindly ask to read the appropriate guidelines before getting in contact. — Thanks!

TL;DR We now use discussions for feature requests (not issues) and prefer if you ask the community for support instead of the overworked maintainers.

Please also consider to contribute by supporting other users or by making a monetary donation. — Thanks!


Acknowledgments

Magit was started by Marius Vollmer, and is now maintained by Jonas Bernoulli and Kyle Meyer. Former maintainers are Nicolas Dudebout, Noam Postavsky, Peter J. Weisberg, Phil Jackson, Rémi Vanicat and Yann Hodique. Many more people have contributed code, suggested features or made monetary contributions.

Thanks to all of you, may (the history of) the source be with you!


Compile Test Manual NonGNU ELPA Melpa Melpa Stable

ghub's People

Contributors

arichiardi avatar aspiers avatar basil-conto avatar dpshelio avatar drielsma avatar elken avatar jabranham avatar julienmasson avatar kiennq avatar kraai avatar kuehnelth avatar manuel-uberti avatar marsam avatar msherry avatar npostavs avatar pkryger avatar scfc avatar smaximov avatar stepnem avatar tarsius avatar torgeir avatar vermiculus avatar wilfred avatar zainab-ali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ghub's Issues

Implement a user-ready authentication workflow

The authentication workflow is something gh.el seems to do very, very well. I like the idea of using existing authentication configuration options, but it would be worthwhile creating an interactive workflow that will guide the user through this configuration when we run into #2.

Since it's not wrapping any resources, this seems to be in-scope for ghub.

can't get ghub to work with GHE

Hi, I'm using a GHE well trying. I'm not an emacs expert so it is probably just me not understanding how to setup the config and then test. Perhaps @diasjorge and @whirm can share their config and testing instructions?

I've tired manually created my .authinfo but I'm still prompted for the wizard and the wizard wants to use api.github.com instead of my GHE instance... Help?

.gitconfig:

[github "foo.bar.com/api/v3"]
        user = donahchoo

.authinfo:

machine foo.bar.com/api/v3 login donahchoo^ghub password TOKEN

try a get:

(ghub-get "/users/donahchoo/repos")

Result:

Such a Github API token is not available:                                                                
                                                                                                         
  Host:    api.github.com                                                                                
  User:    donahchoo                                                                                       
  Package: ghub                                                                                          

fails to gracefully handle pre-existing GitHub auth token

I had some issues with initial auth token setup (I think probably due to an old ghub as per #5), which resulted in the token being created on GitHub but not correctly set up locally (I guess in .authinfo). When I tried to step through again, I think I found a bug in the code which tries to warn the user that there is already an auth token on GitHub of the same name. The problem seems to be in this part of ghub--confirm-create-token:

(if (string-equal (let-alist (nth 3 ghub--create-token-error)
                               (car .errors.code))
                             "already_exists")

I stepped through with edebug and saw this as ghub--create-token-error:

Result: (ghub-http-error 422 "Unprocessable Entity (Added by DAV)" "/authorizations" ((message . "Validation Failed") (errors ((resource . "OauthAccess") (code . "already_exists") (field . "description"))) (documentation_url . "https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization")))

So the first problem is that (nth 3 ghub--create-token-error) evaluates to "/authorizations" not the payload.

Secondly, .errors returns a list of errors, not a single error, so you can't use .code on it directly; instead you need another nested let-alist.

I'll submit a PR with a fix.

Here's the full stacktrace for reference:

Debugger entered--Lisp error: (wrong-type-argument listp "/authorizations")
  assq(errors "/authorizations")
  (cdr (assq 'errors alist))
  (let ((\.errors (cdr (assq 'errors alist)))) (let ((alist (car \.errors))) (let ((\.code (cdr (assq 'code alist)))) \.code)))
  (let ((alist (nth 3 ghub--create-token-error))) (let ((\.errors (cdr (assq 'errors alist)))) (let ((alist (car \.errors))) (let ((\.code (cdr (assq 'code alist)))) \.code))))
  (string-equal (let ((alist (nth 3 ghub--create-token-error))) (let ((\.errors (cdr (assq 'errors alist)))) (let ((alist (car \.errors))) (let ((\.code (cdr (assq 'code alist)))) \.code)))) "already_exists")
  (if (string-equal (let ((alist (nth 3 ghub--create-token-error))) (let ((\.errors (cdr (assq 'errors alist)))) (let ((alist (car \.errors))) (let ((\.code (cdr (assq 'code alist)))) \.code)))) "already_exists") (error "A token named %S already exists on Github. Please visit https://github.com/settings/tokens and delete it." ident))
  (condition-case ghub--create-token-error (ghub-create-token host username package scopes) (ghub-http-error (if (string-equal (let ((alist (nth 3 ghub--create-token-error))) (let ((\.errors (cdr (assq 'errors alist)))) (let ((alist (car \.errors))) (let ((\.code (cdr (assq 'code alist)))) \.code)))) "already_exists") (error "A token named %S already exists on Github. Please visit https://github.com/settings/tokens and delete it." ident))))
  (if (let ((message-log-max nil)) (yes-or-no-p (format "Such a Github API token is not available:\n\n  Host:    %s\n  User:    %s\n  Package: %s\n\n  Scopes requested in `%s-github-token-scopes':\n%s\n  Store on Github as:\n    %S\n  Store locally according to option `auth-sources':\n    %S\n%s\nIf in doubt, then abort and first view the section of\nthe Ghub documentation called \"Interactively Creating\nand Storing a Token\".\n\nOtherwise confirm and then provide your Github username and\npassword at the next two prompts.  Depending on the backend\nyou might have to provide a passphrase and confirm that you\nreally want to save the token.\n\nCreate and store such a token? " host username package package (mapconcat (function (lambda (scope) (format "    %s" scope))) scopes "\n") ident auth-sources (if (and (stringp (car auth-sources)) (not (string-suffix-p ".gpg" (car auth-sources)))) (format "\nWARNING: The token will be stored unencrypted in %S.\n         If you don't want that, you have to abort and customize\n         the `auth-sources' option.\n" (car auth-sources)) "")))) (condition-case ghub--create-token-error (ghub-create-token host username package scopes) (ghub-http-error (if (string-equal (let ((alist (nth 3 ghub--create-token-error))) (let ((\.errors (cdr (assq 'errors alist)))) (let ((alist (car \.errors))) (let ((\.code (cdr (assq 'code alist)))) \.code)))) "already_exists") (error "A token named %S already exists on Github. Please visit https://github.com/settings/tokens and delete it." ident)))) (user-error "Abort"))
  (let* ((ident (ghub--ident-github package)) (scopes (ghub--package-scopes package)) (max-mini-window-height 40)) (if (let ((message-log-max nil)) (yes-or-no-p (format "Such a Github API token is not available:\n\n  Host:    %s\n  User:    %s\n  Package: %s\n\n  Scopes requested in `%s-github-token-scopes':\n%s\n  Store on Github as:\n    %S\n  Store locally according to option `auth-sources':\n    %S\n%s\nIf in doubt, then abort and first view the section of\nthe Ghub documentation called \"Interactively Creating\nand Storing a Token\".\n\nOtherwise confirm and then provide your Github username and\npassword at the next two prompts.  Depending on the backend\nyou might have to provide a passphrase and confirm that you\nreally want to save the token.\n\nCreate and store such a token? " host username package package (mapconcat (function (lambda (scope) (format "    %s" scope))) scopes "\n") ident auth-sources (if (and (stringp (car auth-sources)) (not (string-suffix-p ".gpg" (car auth-sources)))) (format "\nWARNING: The token will be stored unencrypted in %S.\n         If you don't want that, you have to abort and customize\n         the `auth-sources' option.\n" (car auth-sources)) "")))) (condition-case ghub--create-token-error (ghub-create-token host username package scopes) (ghub-http-error (if (string-equal (let ((alist (nth 3 ghub--create-token-error))) (let ((\.errors (cdr (assq 'errors alist)))) (let ((alist (car \.errors))) (let ((\.code (cdr (assq 'code alist)))) \.code)))) "already_exists") (error "A token named %S already exists on Github. Please visit https://github.com/settings/tokens and delete it." ident)))) (user-error "Abort")))
  ghub--confirm-create-token("api.github.com" "aspiers" forge)
  (cond ((memql forge '(nil github)) (ghub--confirm-create-token host username package)) ((memql forge '(gitlab gitea gogs bitbucket)) (error "Required %s token (%S for %S) does not exist.\nSee https://magit.vc/manual/ghub/Support-for-Other-Forges.html for instructions." (capitalize (symbol-name forge)) user host)) ((error "cl-ecase failed: %s, %s" forge '(github nil bitbucket gogs gitea gitlab)) nil))
  (and (not nocreate) (cond ((memql forge '(nil github)) (ghub--confirm-create-token host username package)) ((memql forge '(gitlab gitea gogs bitbucket)) (error "Required %s token (%S for %S) does not exist.\nSee https://magit.vc/manual/ghub/Support-for-Other-Forges.html for instructions." (capitalize (symbol-name forge)) user host)) ((error "cl-ecase failed: %s, %s" forge '(github nil bitbucket gogs gitea gitlab)) nil)))
  (progn (auth-source-forget (list :host host :user user :max 1)) (and (not nocreate) (cond ((memql forge '(nil github)) (ghub--confirm-create-token host username package)) ((memql forge '(gitlab gitea gogs bitbucket)) (error "Required %s token (%S for %S) does not exist.\nSee https://magit.vc/manual/ghub/Support-for-Other-Forges.html for instructions." (capitalize (symbol-name forge)) user host)) ((error "cl-ecase failed: %s, %s" forge '(github nil bitbucket gogs gitea gitlab)) nil))))
  (or (car (ghub--auth-source-get (list :secret) :host host :user user)) (progn (auth-source-forget (list :host host :user user :max 1)) (and (not nocreate) (cond ((memql forge '(nil github)) (ghub--confirm-create-token host username package)) ((memql forge '(gitlab gitea gogs bitbucket)) (error "Required %s token (%S for %S) does not exist.\nSee https://magit.vc/manual/ghub/Support-for-Other-Forges.html for instructions." (capitalize (symbol-name forge)) user host)) ((error "cl-ecase failed: %s, %s" forge '(github nil bitbucket gogs gitea gitlab)) nil)))))
  (let* ((user (ghub--ident username package)) (token (or (car (ghub--auth-source-get (list :secret) :host host :user user)) (progn (auth-source-forget (list :host host :user user :max 1)) (and (not nocreate) (cond ((memql forge '(nil github)) (ghub--confirm-create-token host username package)) ((memql forge '(gitlab gitea gogs bitbucket)) (error "Required %s token (%S for %S) does not exist.\nSee https://magit.vc/manual/ghub/Support-for-Other-Forges.html for instructions." (capitalize (symbol-name forge)) user host)) ((error "cl-ecase failed: %s, %s" forge '(github nil bitbucket gogs gitea gitlab)) nil))))))) (if (functionp token) (funcall token) token))
  ghub--token("api.github.com" "aspiers" forge nil nil)
  (cond ((stringp auth) auth) ((null auth) (ghub--token host username 'ghub nil forge)) ((symbolp auth) (ghub--token host username auth nil forge)) ('t (signal 'wrong-type-argument (list '(or stringp symbolp) auth))))
  (encode-coding-string (cond ((stringp auth) auth) ((null auth) (ghub--token host username 'ghub nil forge)) ((symbolp auth) (ghub--token host username auth nil forge)) ('t (signal 'wrong-type-argument (list '(or stringp symbolp) auth)))) 'utf-8)
  (concat (and (not (eq forge 'gitlab)) "token ") (encode-coding-string (cond ((stringp auth) auth) ((null auth) (ghub--token host username 'ghub nil forge)) ((symbolp auth) (ghub--token host username auth nil forge)) ('t (signal 'wrong-type-argument (list '(or stringp symbolp) auth)))) 'utf-8))
  (cons (cond ((memql forge '(nil github gitea gogs bitbucket)) "Authorization") ((eql forge 'gitlab) "Private-Token") ((error "cl-ecase failed: %s, %s" forge '(bitbucket gogs gitea github nil gitlab)) nil)) (concat (and (not (eq forge 'gitlab)) "token ") (encode-coding-string (cond ((stringp auth) auth) ((null auth) (ghub--token host username 'ghub nil forge)) ((symbolp auth) (ghub--token host username auth nil forge)) ('t (signal 'wrong-type-argument (list '(or stringp symbolp) auth)))) 'utf-8)))
  (if (eq auth 'basic) (cond ((memql forge '(nil github gitea gogs bitbucket)) (cons "Authorization" (ghub--basic-auth host username))) ((eql forge 'gitlab) (error "Gitlab does not support basic authentication")) ((error "cl-ecase failed: %s, %s" forge '(bitbucket gogs gitea github nil gitlab)) nil)) (cons (cond ((memql forge '(nil github gitea gogs bitbucket)) "Authorization") ((eql forge 'gitlab) "Private-Token") ((error "cl-ecase failed: %s, %s" forge '(bitbucket gogs gitea github nil gitlab)) nil)) (concat (and (not (eq forge 'gitlab)) "token ") (encode-coding-string (cond ((stringp auth) auth) ((null auth) (ghub--token host username 'ghub nil forge)) ((symbolp auth) (ghub--token host username auth nil forge)) ('t (signal 'wrong-type-argument (list '(or stringp symbolp) auth)))) 'utf-8))))
  ghub--auth("api.github.com" forge "aspiers" nil)
  (cons (ghub--auth host auth username forge) headers)
  (if (eq auth 'basic) (cons (cons "Authorization" (ghub--basic-auth host username)) headers) (cons (ghub--auth host auth username forge) headers))
  (closure ((forge) (username . "aspiers") (auth . forge) (host . "api.github.com") (headers ("Content-Type" . "application/json")) cl-struct-ghub--req-tags url-http-response-status url-http-extra-headers url-http-end-of-headers url-callback-arguments t) nil (if (eq auth 'basic) (cons (cons "Authorization" (ghub--basic-auth host username)) headers) (cons (ghub--auth host auth username forge) headers)))()
  funcall((closure ((forge) (username . "aspiers") (auth . forge) (host . "api.github.com") (headers ("Content-Type" . "application/json")) cl-struct-ghub--req-tags url-http-response-status url-http-extra-headers url-http-end-of-headers url-callback-arguments t) nil (if (eq auth 'basic) (cons (cons "Authorization" (ghub--basic-auth host username)) headers) (cons (ghub--auth host auth username forge) headers))))
  (if (functionp headers) (funcall headers) headers)
  (let ((headers (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 5)))) (if (functionp headers) (funcall headers) headers))
  (let ((url-request-extra-headers (let ((headers (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 5)))) (if (functionp headers) (funcall headers) headers))) (url-request-method (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 4))) (url-request-data payload) (url-show-status nil) (url (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 1))) (handler (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 6))) (silent (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 3)))) (if (or (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 10)) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 11))) (url-retrieve url handler (list req) silent) (url-do-setup) (save-current-buffer (set-buffer (let ((url-registered-auth-schemes '(("basic" ghub--basic-auth-errorback . 10)))) (url-retrieve-synchronously url silent))) (funcall handler (car url-callback-arguments) req))))
  ghub--retrieve("{\"query\":\"query (\\n$name:String!,\\n$owner:String!) {\\nrepository (\\nname:$name,\\nowner:$owner) {\\nname\\nid\\ncreatedAt\\nupdatedAt\\nnameWithOwner\\nparent {\\nnameWithOwner\\n}\\ndescription\\nhomepageUrl\\ndefaultBranchRef {\\nname\\n}\\nisArchived\\nisFork\\nisLocked\\nisMirror\\nisPrivate\\nhasIssuesEnabled\\nhasWikiEnabled\\nlicenseInfo {\\nname\\n}\\nstargazers {\\ntotalCount\\n}\\nwatchers {\\ntotalCount\\n}\\nassignableUsers (\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\nid\\nlogin\\nname\\n}\\n}\\n}\\nissues (\\norderBy:{field:UPDATED_AT,direction:DESC},\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\nnumber\\nstate\\nauthor {\\nlogin\\n}\\ntitle\\ncreatedAt\\nupdatedAt\\nclosedAt\\nlocked\\nmilestone {\\nid\\n}\\nbody\\nassignees (\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\nid\\n}\\n}\\n}\\ncomments (\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\ndatabaseId\\nauthor {\\nlogin\\n}\\ncreatedAt\\nupdatedAt\\nbody\\n}\\n}\\n}\\nlabels (\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\nid\\n}\\n}\\n}\\n}\\n}\\n}\\nlabels (\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\nid\\nname\\ncolor\\ndescription\\n}\\n}\\n}\\npullRequests (\\norderBy:{field:UPDATED_AT,direction:DESC},\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\nnumber\\nstate\\nauthor {\\nlogin\\n}\\ntitle\\ncreatedAt\\nupdatedAt\\nclosedAt\\nmergedAt\\nlocked\\nmaintainerCanModify\\nisCrossRepository\\nmilestone {\\nid\\n}\\nbody\\nbaseRef {\\nname\\nrepository {\\nnameWithOwner\\n}\\n}\\nheadRef {\\nname\\nrepository {\\nowner {\\nlogin\\n}\\nnameWithOwner\\n}\\n}\\nassignees (\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\nid\\n}\\n}\\n}\\ncomments (\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\ndatabaseId\\nauthor {\\nlogin\\n}\\ncreatedAt\\nupdatedAt\\nbody\\n}\\n}\\n}\\nlabels (\\nfirst:100) {\\npageInfo {\\nendCursor\\nhasNextPage\\n}\\nedges {\\nnode {\\nid\\n}\\n}\\n}\\n}\\n}\\n}\\n}\\n}\",\"variables\":{\"owner\":\"aspiers\",\"name\":\"Fill-Column-Indicator\"}}" #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers (closure ((forge) (username . "aspiers") (auth . forge) (host . "api.github.com") (headers ("Content-Type" . "application/json")) cl-struct-ghub--req-tags url-http-response-status url-http-extra-headers url-http-end-of-headers url-callback-arguments t) nil (if (eq auth 'basic) (cons (cons "Authorization" (ghub--basic-auth host username)) headers) (cons (ghub--auth host auth username forge) headers))) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x16fb05d>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "aspiers") (name . "Fill-Column-Indicator")) :until ((issues-until) (pullRequests-until)) :buffer #<buffer magit: fill-column-indicator> :pages 1))
  ghub--graphql-retrieve(#s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers (closure ((forge) (username . "aspiers") (auth . forge) (host . "api.github.com") (headers ("Content-Type" . "application/json")) cl-struct-ghub--req-tags url-http-response-status url-http-extra-headers url-http-end-of-headers url-callback-arguments t) nil (if (eq auth 'basic) (cons (cons "Authorization" (ghub--basic-auth host username)) headers) (cons (ghub--auth host auth username forge) headers))) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x16fb05d>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "aspiers") (name . "Fill-Column-Indicator")) :until ((issues-until) (pullRequests-until)) :buffer #<buffer magit: fill-column-indicator> :pages 1))
  ghub--graphql-vacuum((query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) ((owner . "aspiers") (name . "Fill-Column-Indicator")) #f(compiled-function (data) #<bytecode 0x16ff57d>) ((issues-until) (pullRequests-until)) :narrow (repository) :username nil :auth forge :host nil :forge nil)
  ghub-fetch-repository("aspiers" "Fill-Column-Indicator" #f(compiled-function (data) #<bytecode 0x16ff57d>) ((issues-until) (pullRequests-until)) :auth forge)
  #f(compiled-function (repo) #<bytecode 0x162a439>)(#<forge-github-repository forge-github-repository>)
  apply(#f(compiled-function (repo) #<bytecode 0x162a439>) #<forge-github-repository forge-github-repository> nil)
  forge--pull(#<forge-github-repository forge-github-repository>)
  forge-pull()
  funcall-interactively(forge-pull)
  #<subr call-interactively>(forge-pull)
  apply(#<subr call-interactively> forge-pull nil)
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> forge-pull)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> forge-pull)
  call-interactively(forge-pull)
  magit-invoke-popup-action(121)
  funcall-interactively(magit-invoke-popup-action 121)
  #<subr call-interactively>(magit-invoke-popup-action nil nil)
  apply(#<subr call-interactively> magit-invoke-popup-action (nil nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> magit-invoke-popup-action nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (magit-invoke-popup-action nil nil))
  call-interactively(magit-invoke-popup-action nil nil)
  command-execute(magit-invoke-popup-action)

Discussion from #81

Discussion from #81 because I'm incredibly confused (and don't want to continue dirtying that issue with unrelated stuff).

@krobelus #81 (comment)

When I call (magit-refresh) it still fails in (ghubp-ratelimit) before calling the function where your fix is applied.

@tarsius #81 (comment)

Ah, so you are using Magithub. (@ me) It seems you have to remove the rate limiting code because Github returns invalid information.

where the invalid information is presumably the output of curl https://api.github.com/rate_limit -sH'Content-Type: application/json' | jq

{
  "resources": {
    "core": {
      "limit": 60,
      "remaining": 60,
      "reset": 1548103605
    },
    "search": {
      "limit": 10,
      "remaining": 10,
      "reset": 1548100065
    },
    "graphql": {
      "limit": 0,
      "remaining": 0,
      "reset": 1548103605
    }
  },
  "rate": {
    "limit": 60,
    "remaining": 60,
    "reset": 1548103605
  }
}

I agree that Github here is returning invalid information, but I don't understand how ghubp-ratelimit is failing.

Here is the complete, current definition of the function:

(defun ghubp-ratelimit (&optional no-headers)
  "[clip]"
  ;; todo: bug when headers are from other host
  (if (and (not no-headers)
           ghub-response-headers
           (assoc-string "X-RateLimit-Limit" ghub-response-headers))
      (let* ((headers (list "X-RateLimit-Limit" "X-RateLimit-Remaining" "X-RateLimit-Reset"))
             (headers (mapcar (lambda (x) (string-to-number (ghubp-header x))) headers)))
        `((limit     . ,(nth 0 headers))
          (remaining . ,(nth 1 headers))
          (reset     . ,(seconds-to-time
                         (nth 2 headers)))))
    (ghubp-catch _
        (let-alist (ghubp-request 'get "/rate_limit" nil nil)
          .resources.core)
      ;; Enterprise returns 404 if rate limiting is disabled
      (404 nil))))

Don't ask me what that bug is; I don't know ☹️ Regardless, magithub never uses the ratelimit information for functional effect. The most use it gets is as an informational header in the dashboard.


What followup is there for magithub? I think this depends on what error you're seeing inside ghubp-ratelimit, @krobelus – can you post the stacktrace? If it is indeed an error in magithub, we can move this issue over there (hopefully).

Support unpaginating when using aliases

Automatic unpagination involves the following (in this we are unpaginating comments on an issue):

query:    (query (repository ... (issue ...)))
response: (data (repository (issue ...)))
lineage:  (repository issue comments)

The lineage allows us to narrow the query to what is needed to fetch paginated comments.

This breaks when the response data is not symmetric to the structure of the request. Unfortunately this is the case when aliases are involved (the repository is missing).

query:    (query (somealias [(:alias t)] (repository ... (issue ...))))
response: (data (somealias (issue ...)))
lineage:  (somealias issue comments)

I have made some progress locating some places where we have to detect that aliases are involved, but I have not yet figured where what data has to modified how, in order to restore symmetry.

The error Field 'nil' doesn't exist on type 'Query' when fetching Github notifications using Forge is a symptom if this. Most likely because an issue with more than a hundred comments is involved.

Unfortunately simply not unpaginating until we have a better solution would also be difficult to do.

Unable to use created token – HTTP 500 Server Error

Tried

(ghub-get "/user" nil :auth 'magithub)

and got the following error:

Debugger entered--Lisp error: (json-readtable-error)
  signal(json-readtable-error nil)
  json-read()
  json-read-from-string("[HUGE html document noting a HTTP 500 error]")
  (let ((json-object-type (quote alist)) (json-array-type (quote list)) (json-key-type (quote symbol)) (json-false nil) (json-null nil)) (json-read-from-string (ghub--read-raw-response)))
  (and (not (eobp)) (let ((json-object-type (quote alist)) (json-array-type (quote list)) (json-key-type (quote symbol)) (json-false nil) (json-null nil)) (json-read-from-string (ghub--read-raw-response))))
  ghub--read-json-response()
  funcall(ghub--read-json-response)
  (setq body (funcall (or reader (quote ghub--read-json-response))))
  (let (link body) (goto-char (point-min)) (let (headers) (while (re-search-forward "^\\([^:]*\\): \\(.+\\)" url-http-end-of-headers t) (setq headers (cons (cons (match-string 1) (match-string 2)) headers))) (and (setq link (cdr (assoc "Link" headers))) (setq link (car (rassoc (list "rel=\"next\"") (mapcar (function ...) (split-string link ","))))) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link))) (setq ghub-response-headers (nreverse headers))) (if url-http-end-of-headers nil (error "ghub: url-http-end-of-headers is nil when it shouldn't")) (goto-char (1+ url-http-end-of-headers)) (setq body (funcall (or reader (quote ghub--read-json-response)))) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (let ((data (list method resource qry payload body))) (cond ((eq url-http-response-status 301) (let nil (signal (quote ghub-301) data))) ((eq url-http-response-status 400) (let nil (signal (quote ghub-400) data))) ((eq url-http-response-status 401) (let nil (signal (quote ghub-401) data))) ((eq url-http-response-status 403) (let nil (signal (quote ghub-403) data))) ((eq url-http-response-status 404) (let nil (signal (quote ghub-404) data))) ((eq url-http-response-status 422) (let nil (signal (quote ghub-422) data))) (t (let nil (signal (quote ghub-http-error) (cons url-http-response-status data))))))) (if (and link unpaginate) (nconc body (ghub-request method resource nil :query (cons (cons (quote page) link) (cl-delete (quote page) query :key (function car))) :payload payload :headers headers :unpaginate t :noerror noerror :reader reader :username username :auth auth :host host)) body))
  (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (let (headers) (while (re-search-forward "^\\([^:]*\\): \\(.+\\)" url-http-end-of-headers t) (setq headers (cons (cons (match-string 1) (match-string 2)) headers))) (and (setq link (cdr (assoc "Link" headers))) (setq link (car (rassoc (list "rel=\"next\"") (mapcar ... ...)))) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link))) (setq ghub-response-headers (nreverse headers))) (if url-http-end-of-headers nil (error "ghub: url-http-end-of-headers is nil when it shouldn't")) (goto-char (1+ url-http-end-of-headers)) (setq body (funcall (or reader (quote ghub--read-json-response)))) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (let ((data (list method resource qry payload body))) (cond ((eq url-http-response-status 301) (let nil (signal ... data))) ((eq url-http-response-status 400) (let nil (signal ... data))) ((eq url-http-response-status 401) (let nil (signal ... data))) ((eq url-http-response-status 403) (let nil (signal ... data))) ((eq url-http-response-status 404) (let nil (signal ... data))) ((eq url-http-response-status 422) (let nil (signal ... data))) (t (let nil (signal ... ...)))))) (if (and link unpaginate) (nconc body (ghub-request method resource nil :query (cons (cons (quote page) link) (cl-delete (quote page) query :key (function car))) :payload payload :headers headers :unpaginate t :noerror noerror :reader reader :username username :auth auth :host host)) body)))
  (unwind-protect (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (let (headers) (while (re-search-forward "^\\([^:]*\\): \\(.+\\)" url-http-end-of-headers t) (setq headers (cons (cons ... ...) headers))) (and (setq link (cdr (assoc "Link" headers))) (setq link (car (rassoc ... ...))) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link))) (setq ghub-response-headers (nreverse headers))) (if url-http-end-of-headers nil (error "ghub: url-http-end-of-headers is nil when it shouldn't")) (goto-char (1+ url-http-end-of-headers)) (setq body (funcall (or reader (quote ghub--read-json-response)))) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (let ((data (list method resource qry payload body))) (cond ((eq url-http-response-status 301) (let nil ...)) ((eq url-http-response-status 400) (let nil ...)) ((eq url-http-response-status 401) (let nil ...)) ((eq url-http-response-status 403) (let nil ...)) ((eq url-http-response-status 404) (let nil ...)) ((eq url-http-response-status 422) (let nil ...)) (t (let nil ...))))) (if (and link unpaginate) (nconc body (ghub-request method resource nil :query (cons (cons ... link) (cl-delete ... query :key ...)) :payload payload :headers headers :unpaginate t :noerror noerror :reader reader :username username :auth auth :host host)) body))) (kill-buffer buf))
  (let* ((qry (and query (concat "?" (ghub--url-encode-params query)))) (buf (let ((url-request-extra-headers (cons (quote ...) (append ... headers))) (url-request-method method) (url-request-data payload)) (url-retrieve-synchronously (concat "https://" host resource qry))))) (unwind-protect (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (let (headers) (while (re-search-forward "^\\([^:]*\\): \\(.+\\)" url-http-end-of-headers t) (setq headers (cons ... headers))) (and (setq link (cdr ...)) (setq link (car ...)) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link))) (setq ghub-response-headers (nreverse headers))) (if url-http-end-of-headers nil (error "ghub: url-http-end-of-headers is nil when it shouldn't")) (goto-char (1+ url-http-end-of-headers)) (setq body (funcall (or reader (quote ghub--read-json-response)))) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (let ((data ...)) (cond (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (t ...)))) (if (and link unpaginate) (nconc body (ghub-request method resource nil :query (cons ... ...) :payload payload :headers headers :unpaginate t :noerror noerror :reader reader :username username :auth auth :host host)) body))) (kill-buffer buf)))
  (progn (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host))) (cond ((not params)) ((memq method (quote ("GET" "HEAD"))) (if query (progn (error "PARAMS and QUERY are mutually exclusive for METHOD %S" method))) (setq query params)) (t (if payload (progn (error "PARAMS and PAYLOAD are mutually exclusive for METHOD %S" method))) (setq payload params))) (if (and payload (not (stringp payload))) (progn (setq payload (encode-coding-string (json-encode-list payload) (quote utf-8))))) (let* ((qry (and query (concat "?" (ghub--url-encode-params query)))) (buf (let ((url-request-extra-headers (cons ... ...)) (url-request-method method) (url-request-data payload)) (url-retrieve-synchronously (concat "https://" host resource qry))))) (unwind-protect (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (let (headers) (while (re-search-forward "^\\([^:]*\\): \\(.+\\)" url-http-end-of-headers t) (setq headers ...)) (and (setq link ...) (setq link ...) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link ...)) (setq ghub-response-headers (nreverse headers))) (if url-http-end-of-headers nil (error "ghub: url-http-end-of-headers is nil when it shouldn't")) (goto-char (1+ url-http-end-of-headers)) (setq body (funcall (or reader ...))) (if (or noerror (= ... 2)) nil (let (...) (cond ... ... ... ... ... ... ...))) (if (and link unpaginate) (nconc body (ghub-request method resource nil :query ... :payload payload :headers headers :unpaginate t :noerror noerror :reader reader :username username :auth auth :host host)) body))) (kill-buffer buf))))
  (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) (quote (:query :payload :headers :unpaginate :noerror :reader :username :auth :host :allow-other-keys))) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :unpaginate :noerror :reader :username :auth :host)" (car --cl-keys--)))))) (progn (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host))) (cond ((not params)) ((memq method (quote ("GET" "HEAD"))) (if query (progn (error "PARAMS and QUERY are mutually exclusive for METHOD %S" method))) (setq query params)) (t (if payload (progn (error "PARAMS and PAYLOAD are mutually exclusive for METHOD %S" method))) (setq payload params))) (if (and payload (not (stringp payload))) (progn (setq payload (encode-coding-string (json-encode-list payload) (quote utf-8))))) (let* ((qry (and query (concat "?" (ghub--url-encode-params query)))) (buf (let ((url-request-extra-headers ...) (url-request-method method) (url-request-data payload)) (url-retrieve-synchronously (concat "https://" host resource qry))))) (unwind-protect (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (let (headers) (while ... ...) (and ... ... ... ...) (setq ghub-response-headers ...)) (if url-http-end-of-headers nil (error "ghub: url-http-end-of-headers is nil when it shouldn't")) (goto-char (1+ url-http-end-of-headers)) (setq body (funcall ...)) (if (or noerror ...) nil (let ... ...)) (if (and link unpaginate) (nconc body ...) body))) (kill-buffer buf)))))
  (let* ((query (car (cdr (plist-member --cl-rest-- (quote :query))))) (payload (car (cdr (plist-member --cl-rest-- (quote :payload))))) (headers (car (cdr (plist-member --cl-rest-- (quote :headers))))) (unpaginate (car (cdr (plist-member --cl-rest-- (quote :unpaginate))))) (noerror (car (cdr (plist-member --cl-rest-- (quote :noerror))))) (reader (car (cdr (plist-member --cl-rest-- (quote :reader))))) (username (car (cdr (plist-member --cl-rest-- (quote :username))))) (auth (car (cdr (plist-member --cl-rest-- (quote :auth))))) (host (car (cdr (plist-member --cl-rest-- (quote :host)))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) (quote ...)) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :unpaginate :noerror :reader :username :auth :host)" (car --cl-keys--)))))) (progn (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host))) (cond ((not params)) ((memq method (quote ("GET" "HEAD"))) (if query (progn (error "PARAMS and QUERY are mutually exclusive for METHOD %S" method))) (setq query params)) (t (if payload (progn (error "PARAMS and PAYLOAD are mutually exclusive for METHOD %S" method))) (setq payload params))) (if (and payload (not (stringp payload))) (progn (setq payload (encode-coding-string (json-encode-list payload) (quote utf-8))))) (let* ((qry (and query (concat "?" ...))) (buf (let (... ... ...) (url-retrieve-synchronously ...)))) (unwind-protect (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let (link body) (goto-char ...) (let ... ... ... ...) (if url-http-end-of-headers nil ...) (goto-char ...) (setq body ...) (if ... nil ...) (if ... ... body))) (kill-buffer buf))))))
  (closure (url-http-response-status url-http-end-of-headers t) (method resource &optional params &rest --cl-rest--) "[ghub-request doc]" (let* ((query (car (cdr (plist-member --cl-rest-- (quote :query))))) (payload (car (cdr (plist-member --cl-rest-- (quote :payload))))) (headers (car (cdr (plist-member --cl-rest-- (quote :headers))))) (unpaginate (car (cdr (plist-member --cl-rest-- (quote :unpaginate))))) (noerror (car (cdr (plist-member --cl-rest-- (quote :noerror))))) (reader (car (cdr (plist-member --cl-rest-- (quote :reader))))) (username (car (cdr (plist-member --cl-rest-- (quote :username))))) (auth (car (cdr (plist-member --cl-rest-- (quote :auth))))) (host (car (cdr (plist-member --cl-rest-- (quote :host)))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq ... ...) (setq --cl-keys-- ...)) ((car ...) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :unpaginate :noerror :reader :username :auth :host)" ...))))) (progn (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host))) (cond ((not params)) ((memq method (quote ...)) (if query (progn ...)) (setq query params)) (t (if payload (progn ...)) (setq payload params))) (if (and payload (not (stringp payload))) (progn (setq payload (encode-coding-string ... ...)))) (let* ((qry (and query ...)) (buf (let ... ...))) (unwind-protect (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let ... ... ... ... ... ... ... ...)) (kill-buffer buf)))))))("GET" "/user" nil :query nil :payload nil :headers nil :unpaginate nil :noerror nil :reader nil :username nil :auth magithub :host nil)
  apply((closure (url-http-response-status url-http-end-of-headers t) (method resource &optional params &rest --cl-rest--) "[ghub-request doc]" (let* ((query (car (cdr (plist-member --cl-rest-- (quote :query))))) (payload (car (cdr (plist-member --cl-rest-- (quote :payload))))) (headers (car (cdr (plist-member --cl-rest-- (quote :headers))))) (unpaginate (car (cdr (plist-member --cl-rest-- (quote :unpaginate))))) (noerror (car (cdr (plist-member --cl-rest-- (quote :noerror))))) (reader (car (cdr (plist-member --cl-rest-- (quote :reader))))) (username (car (cdr (plist-member --cl-rest-- (quote :username))))) (auth (car (cdr (plist-member --cl-rest-- (quote :auth))))) (host (car (cdr (plist-member --cl-rest-- (quote :host)))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq ... ...) (setq --cl-keys-- ...)) ((car ...) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :unpaginate :noerror :reader :username :auth :host)" ...))))) (progn (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host))) (cond ((not params)) ((memq method (quote ...)) (if query (progn ...)) (setq query params)) (t (if payload (progn ...)) (setq payload params))) (if (and payload (not (stringp payload))) (progn (setq payload (encode-coding-string ... ...)))) (let* ((qry (and query ...)) (buf (let ... ...))) (unwind-protect (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let ... ... ... ... ... ... ... ...)) (kill-buffer buf))))))) ("GET" "/user" nil :query nil :payload nil :headers nil :unpaginate nil :noerror nil :reader nil :username nil :auth magithub :host nil))
  (if (magithub-debug-mode (quote dry-api)) nil (apply oldfun args))
  magithub-debug--ghub-request-wrapper((closure (url-http-response-status url-http-end-of-headers t) (method resource &optional params &rest --cl-rest--) "[ghub-request doc]" (let* ((query (car (cdr (plist-member --cl-rest-- (quote :query))))) (payload (car (cdr (plist-member --cl-rest-- (quote :payload))))) (headers (car (cdr (plist-member --cl-rest-- (quote :headers))))) (unpaginate (car (cdr (plist-member --cl-rest-- (quote :unpaginate))))) (noerror (car (cdr (plist-member --cl-rest-- (quote :noerror))))) (reader (car (cdr (plist-member --cl-rest-- (quote :reader))))) (username (car (cdr (plist-member --cl-rest-- (quote :username))))) (auth (car (cdr (plist-member --cl-rest-- (quote :auth))))) (host (car (cdr (plist-member --cl-rest-- (quote :host)))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq ... ...) (setq --cl-keys-- ...)) ((car ...) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :unpaginate :noerror :reader :username :auth :host)" ...))))) (progn (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host))) (cond ((not params)) ((memq method (quote ...)) (if query (progn ...)) (setq query params)) (t (if payload (progn ...)) (setq payload params))) (if (and payload (not (stringp payload))) (progn (setq payload (encode-coding-string ... ...)))) (let* ((qry (and query ...)) (buf (let ... ...))) (unwind-protect (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let ... ... ... ... ... ... ... ...)) (kill-buffer buf))))))) "GET" "/user" nil :query nil :payload nil :headers nil :unpaginate nil :noerror nil :reader nil :username nil :auth magithub :host nil)
  apply(magithub-debug--ghub-request-wrapper (closure (url-http-response-status url-http-end-of-headers t) (method resource &optional params &rest --cl-rest--) "[ghub-request doc]" (let* ((query (car (cdr (plist-member --cl-rest-- (quote :query))))) (payload (car (cdr (plist-member --cl-rest-- (quote :payload))))) (headers (car (cdr (plist-member --cl-rest-- (quote :headers))))) (unpaginate (car (cdr (plist-member --cl-rest-- (quote :unpaginate))))) (noerror (car (cdr (plist-member --cl-rest-- (quote :noerror))))) (reader (car (cdr (plist-member --cl-rest-- (quote :reader))))) (username (car (cdr (plist-member --cl-rest-- (quote :username))))) (auth (car (cdr (plist-member --cl-rest-- (quote :auth))))) (host (car (cdr (plist-member --cl-rest-- (quote :host)))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq ... ...) (setq --cl-keys-- ...)) ((car ...) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :unpaginate :noerror :reader :username :auth :host)" ...))))) (progn (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host))) (cond ((not params)) ((memq method (quote ...)) (if query (progn ...)) (setq query params)) (t (if payload (progn ...)) (setq payload params))) (if (and payload (not (stringp payload))) (progn (setq payload (encode-coding-string ... ...)))) (let* ((qry (and query ...)) (buf (let ... ...))) (unwind-protect (save-current-buffer (set-buffer buf) (set-buffer-multibyte t) (let ... ... ... ... ... ... ... ...)) (kill-buffer buf))))))) ("GET" "/user" nil :query nil :payload nil :headers nil :unpaginate nil :noerror nil :reader nil :username nil :auth magithub :host nil))
  ghub-request("GET" "/user" nil :query nil :payload nil :headers nil :unpaginate nil :noerror nil :reader nil :username nil :auth magithub :host nil)
  (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) (quote (:query :payload :headers :unpaginate :noerror :reader :username :auth :host :allow-other-keys))) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :unpaginate :noerror :reader :username :auth :host)" (car --cl-keys--)))))) (ghub-request "GET" resource params :query query :payload payload :headers headers :unpaginate unpaginate :noerror noerror :reader reader :username username :auth auth :host host))
  (let* ((query (car (cdr (plist-member --cl-rest-- (quote :query))))) (payload (car (cdr (plist-member --cl-rest-- (quote :payload))))) (headers (car (cdr (plist-member --cl-rest-- (quote :headers))))) (unpaginate (car (cdr (plist-member --cl-rest-- (quote :unpaginate))))) (noerror (car (cdr (plist-member --cl-rest-- (quote :noerror))))) (reader (car (cdr (plist-member --cl-rest-- (quote :reader))))) (username (car (cdr (plist-member --cl-rest-- (quote :username))))) (auth (car (cdr (plist-member --cl-rest-- (quote :auth))))) (host (car (cdr (plist-member --cl-rest-- (quote :host)))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) (quote ...)) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :unpaginate :noerror :reader :username :auth :host)" (car --cl-keys--)))))) (ghub-request "GET" resource params :query query :payload payload :headers headers :unpaginate unpaginate :noerror noerror :reader reader :username username :auth auth :host host)))
  ghub-get("/user" nil :auth magithub)
  eval((ghub-get "/user" nil :auth (quote magithub)) t)
  pp-eval-expression((ghub-get "/user" nil :auth (quote magithub)))
  pp-eval-last-sexp(nil)
  funcall-interactively(pp-eval-last-sexp nil)
  call-interactively(pp-eval-last-sexp nil nil)
  command-execute(pp-eval-last-sexp)

The funny thing: (ghub--auth "api.github.com" 'magithub "vermiculus") correctly retrieves the token that was created earlier (under vermiculus^magithub). There is authentication for the request and it is being bound to url-request-extra-headers; url.el just isn't having any of it.

Any idea what may be going on here?

Unable to install magit due to ghub->graphql?

Hi! I recently (in the last hour) found I was unable to install magit, with the message:

Error (use-package): Failed to install magit: Package ‘graphql-0’ is unavailable
Error (use-package): Cannot load magit

I saw that there was a dependency of magit -> ghub -> graphql, which is why I'm opening this issue in this repo instead of magit. Let me know if that's wrong!

Can you advise me on what I am doing wrong, or how I might work around this issue?

Question: simple method to get notifications

Hi, I am wondering if there is a simple method to get notifications via ghub. Can you please give an example or snippet?

I am using ghub+ currently, but i'd like remove this dependency since I've switched from magithub to forge.

(ignore-errors
  (ghubp-get-notifications :participating "true"))

Suggest scopes

Could you suggest which scope(s) a user should provide for the magit token? And perhaps add these details to the installation instructions?

git config command from README fails

Hi!

I'm trying to follow the GHE instructions from the README but git complains that the key given is invalid.

~/src/emacs $ hub --version
git version 2.13.3
hub version 2.2.9
~/src/emacs $ git config eg_example_com.user employee
error: invalid key: eg_example_com.user

Thanks!

*-token-scopes

At
https://magit.vc/manual/ghub/Manually-Creating-and-Storing-a-Token.html#Manually-Creating-and-Storing-a-Token
it is written:

A package named PACKAGE has to specify the scopes that it wants in the variable named PACKAGE-ghub-token-scopes. The doc-string of such variables should document what the various scopes are needed for.

I did not find any .*-ghub-token-scopes variables even though I have forge installed. But I do see variables of the form PACKAGE-FORGE-token-scopes:

forge-github-token-scopes
Variable: The Github API scopes needed by Magit.
Properties: variable-documentation
forge-gitlab-token-scopes
Variable: The Gitlab API scopes needed by Magit.
Properties: variable-documentation
ghub-github-token-scopes
Variable: The Github API scopes that your private tools need.
Properties: variable-documentation

Move away from let-bindings

When let-bindings were only used to set use another github instance, then it made sense. That was a use-case I knew I had to support but I figured it would be used very little, so I did not want to "pollute" the function signatures. Back then we already also used it to signal ghub--request to unpaginate a resource, and that was a bit strange. I think I did it because I did it for the "instance" also, and maybe I felt that was appropriate because url.el itself makes heavy use of let-bindings.

But then more and more new "variables to be let-bound" got added, and now I find this really weird and old-fashioned.

I was experimenting with adding function arguments as an alternative method to request non-default behavior. But that got out of hand quickly - lots of documentation and accidental complexity.

I am now considering to give up let-bindings altogether and to use function arguments exclusively. This would break backward compatibility, but I think now is the time to make such changes.

/cc @vermiculus

does ghub work with SSO GHE?

I'm wondering if the root of my issue is that ghub doesn't work with SSO GHE? I've gotten hub to work, but maybe there's something in ghub that needs a tweak. I can't get ghub-create-token to complete successfully because of our SSO redirect. ghub ends up with:

HTTP Error: 400, "Bad Request", "and Github didn't return JSON"

ghub--token is broken, can't find my token

ghub--token uses auth-source-search to search for the Github token. I put my token in ~/.netrc, but it still can't find it. The reason seems to be that the order of keywords passed to auth-source-search is significant. (auth-source-search :max 1 :user "DarwinAwardWinner" :host "api.github.com") returns nil, while (auth-source-search :user "DarwinAwardWinner" :host "api.github.com" :max 1) returns my Github login. ghub--token uses the former. I notice that all the examples in the docstring for auth-source-search put :max 1 at the end of the search specification, but the docstring doesn't appear to document this order-dependence, so I'm not sure if it's a bug or a feature.

Setting up multiple github accounts

I see git config --global github.user <username> in the documentation to setup ghub. Can I not use local configuration because I've multiple github accounts?

Support for GitHub Enterprise

This will probably involve more generalized authentication and variability of ghub--domain and ghub--root-endpoint. I'd suggest overriding the latter as pre-repo git-config variables.

In keeping things general in /.git/config, it might be worthwhile to use a magit-collab section header and a provider=github key.

Consider dropping Emacs 25 requirement

Hi. Would it be possible to downgrade the Emacs 25 requirement to Emacs 24? I don't know what features of E25 exactly are being used here but maybe they could be backported? Or a separate branch could be set up without this requirement.

Personally I feel it is a bit too early dropping Emacs 24 support (and this also affects me as I still use it in some environments).

If you point me to where the problem is I could maybe provide a patch myself.

ghub--auth-source-get uses token for a different :user

I use a custom auth-source backend for querying the Unix pass utility (which I wrote because the now-built-in auth-source-pass backend suffers from several bugs/limitations which I have not yet addressed upstream).

One (under-documented) auth-source feature which my backend supports is the :require search property. Quoth the docstring of auth-source-search:

:require (A B C) means that only results that contain those
tokens will be returned.  Thus for instance requiring :secret
will ensure that any results will actually have a :secret
property.

No callers of ghub--auth-source-get currently specify the :require property. The effect of this is that Ghub unconditionally uses the first search result, even when I have multiple api.github.com tokens that differ only in the :user (AIUI, auth-source-search searches based on a union of all specified properties when :require is omitted; see (auth) Help for developers).

If ghub--token specified the :require property, then this would disambiguate the multiple api.github.com tokens I have. To address this, I currently intercept calls to ghub--auth-source-get and add the :require property myself using advice.

So I think that ghub--token should specify the :require property, but maybe I'm missing something? WDYT?

ghub keeps opening processes until it locks Emacs

I'm not entirely sure the origin of this issue is actually ghub, it might be magit trying to request data - but here's the problem at least:

If I have emacs running for a while (few hours), eventually I won't be able to save or open files any more because of "too many open file handles". The issue appears to be that ghub tries to open connections that it never closes. When this problem appears I usually have around 100 open buffers in fundamental mode containing the following message:

Lisp expression: Such a Github API token is not available:

  Host:    api.github.com
  User:    accatyyc
  Package: ghub

  Scopes requested in `ghub-github-token-scopes':
    repo
  Store on Github as:
    "Emacs package ghub @ Joels-Macbook-Pro"
  Store locally according to option `auth-sources':
    ("~/.authinfo" "~/.authinfo.gpg" "~/.netrc")

WARNING: The token will be stored unencrypted in "~/.authinfo".
         If you don't want that, you have to abort and customize
         the `auth-sources' option.

If in doubt, then abort and first view the section of
the Ghub documentation called "Interactively Creating
and Storing a Token".

Otherwise confirm and then provide your Github username and
password at the next two prompts.  Depending on the backend
you might have to provide a passphrase and confirm that you
really want to save the token.

Create and store such a token? (yes or no) 

Since the buffers are just fundamental mode I cannot interact with them even if the message seems meant to be interactive.

If I try to close these buffers, emacs will complain that they have running processes.

The issue is probably something with my tokens that I can fix, but I think ghub is doing the wrong thing here to bring down emacs with it!

can't read the token in the authinfo.gpg

Hello,

I tried to run this command:

(ghub-get "/user")

which did several prompted and lead to creation of a key on my github account and to save it in my authinfo.gpg. After verification, I have a line like this one in my authinfo.gpg :

machine api.github.com login seblemaguer^ghub password <key>

where <key> correspond to the key generated by ghub as I can checked on my github account. However, when I rerun the command ghub-get, it ignores the key stored in my authinfo. I checked with only this line on the authinfo.gpg, same problem. Do you have a lead on where to have a look?

Thanks a lot

`auth-source-search` not returning `:secret` in Emacs 25.2.2

I had a little struggle to debug why I was always getting prompted to create a token when calling ghub-get and friends. I found in the end that the call to auth-source-search in ghub--auth-source-get doesn't return any value for the :secret key when :max 1 is passed. If :max 2 or higher is passed or the argument is not passed then :secret is present. With Emacs 26.1 this works as expected.

My .authinfo file is as follows:

machine api.github.com login rneatherway^ghub password 11111..

I raise this here because I saw you said in #57 that this package patches auth-source. Let me know if I can provide any further information.

Error on token creation

I already have a populated .authinfo.gpg and use it in other elisp packages.

The token is successfully created on the github site.

While attempting to use vermiculus/magithub (and thus ghub) for the first time, I encounter an error every time ghub tries to create a token, which is every time it tries to use one, since it can never find one.

Backtrace:

Debugger entered--Lisp error: (void-function nil)
  nil()
  funcall(nil)
  (progn (funcall save) (auth-source-forget (list :host host :user user)) token)
  (let* ((--cl-rest-- (ghub--auth-source-get (list :save-function :secret) :create t :host host :user user :secret (cdr (assq 'token (ghub-post "/authorizations" `((scopes \, scopes) (note \, (ghub--ident-github package))) :username username :auth 'basic :host host))))) (save (if (= (length --cl-rest--) 2) (pop --cl-rest--) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--))))) (token (car --cl-rest--))) (progn (funcall save) (auth-source-forget (list :host host :user user)) token))
  (cl-destructuring-bind (save token) (ghub--auth-source-get (list :save-function :secret) :create t :host host :user user :secret (cdr (assq 'token (ghub-post "/authorizations" `((scopes \, scopes) (note \, (ghub--ident-github package))) :username username :auth 'basic :host host)))) (funcall save) (auth-source-forget (list :host host :user user)) token)
  (let ((user (ghub--ident username package))) (cl-destructuring-bind (save token) (ghub--auth-source-get (list :save-function :secret) :create t :host host :user user :secret (cdr (assq 'token (ghub-post "/authorizations" `((scopes \, scopes) (note \, (ghub--ident-github package))) :username username :auth 'basic :host host)))) (funcall save) (auth-source-forget (list :host host :user user)) token))
  ghub-create-token("api.github.com" "emacswatcher" magithub (repo user notifications))
  ghub--confirm-create-token("api.github.com" "emacswatcher" magithub)
  ghub--token("api.github.com" "emacswatcher" magithub nil nil)
  ghub--auth("api.github.com" magithub "emacswatcher" nil)
  #f(compiled-function () #<bytecode>)()
  ghub--retrieve(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/emacswatcher/yasnippet-backsolve" :target nil :attributes nil :fullness t :silent nil :use-cookies t) :silent nil :method "GET" :headers #f(compiled-function () #<bytecode>) :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  #f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response header in `ghub-response-headers'.\n\nMETHOD is the http method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return json, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the method\n  specific functions also.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If an error occurred, then call ERRORBACK, or if\n  that is nil, then CALLBACK.  When no error occurred then call\n  CALLBACK.  When making asynchronous requests, then no errors\n  are signaled, regardless of the value of NOERROR.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACk, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode>)("GET" "/repos/emacswatcher/yasnippet-backsolve" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil)
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response header in `ghub-response-headers'.\n\nMETHOD is the http method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return json, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the method\n  specific functions also.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If an error occurred, then call ERRORBACK, or if\n  that is nil, then CALLBACK.  When no error occurred then call\n  CALLBACK.  When making asynchronous requests, then no errors\n  are signaled, regardless of the value of NOERROR.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACk, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode>) ("GET" "/repos/emacswatcher/yasnippet-backsolve" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil))
  magithub-debug--ghub-request-wrapper(#f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response header in `ghub-response-headers'.\n\nMETHOD is the http method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return json, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the method\n  specific functions also.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If an error occurred, then call ERRORBACK, or if\n  that is nil, then CALLBACK.  When no error occurred then call\n  CALLBACK.  When making asynchronous requests, then no errors\n  are signaled, regardless of the value of NOERROR.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACk, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode>) "GET" "/repos/emacswatcher/yasnippet-backsolve" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil)
  apply(magithub-debug--ghub-request-wrapper #f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response header in `ghub-response-headers'.\n\nMETHOD is the http method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return json, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the method\n  specific functions also.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If an error occurred, then call ERRORBACK, or if\n  that is nil, then CALLBACK.  When no error occurred then call\n  CALLBACK.  When making asynchronous requests, then no errors\n  are signaled, regardless of the value of NOERROR.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACk, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode>) ("GET" "/repos/emacswatcher/yasnippet-backsolve" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil))
  ghub-request("GET" "/repos/emacswatcher/yasnippet-backsolve" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil)
  ghubp-request(get "/repos/emacswatcher/yasnippet-backsolve" nil nil)
  apply(ghubp-request get "/repos/emacswatcher/yasnippet-backsolve" (nil nil))
  ghubp-get-repos-owner-repo(((owner (login . "emacswatcher")) (name . "yasnippet-backsolve")))
  (let ((G349 (ghubp-get-context)) ghubp-contextualize-function) (push (cons 'auth 'magithub) G349) (setq ghubp-contextualize-function (lambda nil G349)) (ghubp-get-repos-owner-repo '((owner (login . "emacswatcher")) (name . "yasnippet-backsolve"))))
  (ghubp-override-context auth 'magithub (ghubp-get-repos-owner-repo '((owner (login . "emacswatcher")) (name . "yasnippet-backsolve"))))
  (magithub-request (ghubp-get-repos-owner-repo '((owner (login . "emacswatcher")) (name . "yasnippet-backsolve"))))
  (or (magithub-request (ghubp-get-repos-owner-repo '((owner (login . "emacswatcher")) (name . "yasnippet-backsolve")))) (and (not (magithub--api-available-p)) sparse-repo))
  (condition-case e (or (magithub-request (ghubp-get-repos-owner-repo '((owner (login . "emacswatcher")) (name . "yasnippet-backsolve")))) (and (not (magithub--api-available-p)) sparse-repo)) (ghub-404 nil))
  eval((condition-case e (or (magithub-request (ghubp-get-repos-owner-repo '((owner (login . "emacswatcher")) (name . "yasnippet-backsolve")))) (and (not (magithub--api-available-p)) sparse-repo)) (ghub-404 nil)))
  magithub-cache(:repo-demographics (condition-case e (or (magithub-request (ghubp-get-repos-owner-repo '((owner (login . "emacswatcher")) (name . "yasnippet-backsolve")))) (and (not (magithub--api-available-p)) sparse-repo)) (ghub-404 nil)))
  magithub-repo()
  magithub--issue-list()
  magithub-pull-requests()
  magithub-issue--insert-pr-section()
  run-hooks(magit-status-sections-hook)
  magit-run-section-hook(magit-status-sections-hook)
  magit-status-refresh-buffer()
  apply(magit-status-refresh-buffer nil)
  magit-refresh-buffer()
  magit-mode-setup-internal(magit-status-mode nil)
  magit-mode-setup(magit-status-mode)
  magit-status-internal("/home/emacs/yasnippet-backsolve/")
  magit-status(nil ((113 . 26) (("/home/emacs/yasnippet-backsolve/" "symbolic-ref" #("refs/remotes/origin/HEAD" 13 19 (face magit-branch-remote))) . "refs/remotes/origin/master") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--short" "HEAD~") . "afd27f7") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--short" "HEAD") . "ccccece") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--verify" "HEAD~10")) (("/home/emacs/yasnippet-backsolve/" "rev-parse" "@{upstream}") . "ccccece06a7ffef2cd0e2166a567cb43880cc1b0") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--verify" "refs/stash")) (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--is-bare-repository") . "false\n") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "BISECT_LOG") . "/home/emacs/yasnippet-backsolve/.git/BISECT_LOG") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "REVERT_HEAD") . "/home/emacs/yasnippet-backsolve/.git/REVERT_HEAD") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "CHERRY_PICK_HEAD") . "/home/emacs/yasnippet-backsolve/.git/CHERRY_PICK_HEAD") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "rebase-apply/applying") . "/home/emacs/yasnippet-backsolve/.git/rebase-apply/applying") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "rebase-apply/onto") . "/home/emacs/yasnippet-backsolve/.git/rebase-apply/onto") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "rebase-merge") . "/home/emacs/yasnippet-backsolve/.git/rebase-merge") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "MERGE_HEAD") . "/home/emacs/yasnippet-backsolve/.git/MERGE_HEAD") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--git-dir") . ".git") (("/home/emacs/yasnippet-backsolve/" "describe" "--contains" "HEAD")) (("/home/emacs/yasnippet-backsolve/" "describe" "--long" "--tags")) (("/home/emacs/yasnippet-backsolve/" "show" "--no-patch" "--format=%s" #("origin/master^{commit}" 0 13 (face magit-branch-remote)) "--") . "add README") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--verify" #("origin/master" 0 13 (face magit-branch-remote))) . "ccccece06a7ffef2cd0e2166a567cb43880cc1b0") (("/home/emacs/yasnippet-backsolve/" "show" "--no-patch" "--format=%h %s" "master^{commit}" "--") . "ccccece add README") (("/home/emacs/yasnippet-backsolve/" "symbolic-ref" "--short" "HEAD") . "master") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--verify" "HEAD") . "ccccece06a7ffef2cd0e2166a567cb43880cc1b0") ((config "/home/emacs/yasnippet-backsolve/") . #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("user.email" ("[email protected]") "user.name" ("Emacs Watcher") "core.editor" ("emacs") "push.default" ("simple") "github.user" ("emacswatcher") "core.repositoryformatversion" ("0") "core.filemode" ("true") "core.bare" ("false") "core.logallrefupdates" ("true") "remote.origin.url" ("https://github.com/emacswatcher/yasnippet-backsolve.git") "remote.origin.fetch" ("+refs/heads/*:refs/remotes/origin/*") "branch.master.remote" ("origin") "branch.master.merge" ("refs/heads/master") "core.preloadindex" ("true") "log.showsignature" ("false") ...))) (("/home/emacs/yasnippet-backsolve/" . magit-toplevel) . "/home/emacs/yasnippet-backsolve/") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--show-cdup") . "") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--show-toplevel") . "/home/emacs/yasnippet-backsolve")))
  funcall-interactively(magit-status nil ((113 . 26) (("/home/emacs/yasnippet-backsolve/" "symbolic-ref" #("refs/remotes/origin/HEAD" 13 19 (face magit-branch-remote))) . "refs/remotes/origin/master") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--short" "HEAD~") . "afd27f7") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--short" "HEAD") . "ccccece") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--verify" "HEAD~10")) (("/home/emacs/yasnippet-backsolve/" "rev-parse" "@{upstream}") . "ccccece06a7ffef2cd0e2166a567cb43880cc1b0") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--verify" "refs/stash")) (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--is-bare-repository") . "false\n") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "BISECT_LOG") . "/home/emacs/yasnippet-backsolve/.git/BISECT_LOG") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "REVERT_HEAD") . "/home/emacs/yasnippet-backsolve/.git/REVERT_HEAD") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "CHERRY_PICK_HEAD") . "/home/emacs/yasnippet-backsolve/.git/CHERRY_PICK_HEAD") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "rebase-apply/applying") . "/home/emacs/yasnippet-backsolve/.git/rebase-apply/applying") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "rebase-apply/onto") . "/home/emacs/yasnippet-backsolve/.git/rebase-apply/onto") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "rebase-merge") . "/home/emacs/yasnippet-backsolve/.git/rebase-merge") (("/home/emacs/yasnippet-backsolve/" magit-git-dir "MERGE_HEAD") . "/home/emacs/yasnippet-backsolve/.git/MERGE_HEAD") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--git-dir") . ".git") (("/home/emacs/yasnippet-backsolve/" "describe" "--contains" "HEAD")) (("/home/emacs/yasnippet-backsolve/" "describe" "--long" "--tags")) (("/home/emacs/yasnippet-backsolve/" "show" "--no-patch" "--format=%s" #("origin/master^{commit}" 0 13 (face magit-branch-remote)) "--") . "add README") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--verify" #("origin/master" 0 13 (face magit-branch-remote))) . "ccccece06a7ffef2cd0e2166a567cb43880cc1b0") (("/home/emacs/yasnippet-backsolve/" "show" "--no-patch" "--format=%h %s" "master^{commit}" "--") . "ccccece add README") (("/home/emacs/yasnippet-backsolve/" "symbolic-ref" "--short" "HEAD") . "master") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--verify" "HEAD") . "ccccece06a7ffef2cd0e2166a567cb43880cc1b0") ((config "/home/emacs/yasnippet-backsolve/") . #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("user.email" ("[email protected]") "user.name" ("Emacs Watcher") "core.editor" ("emacs") "push.default" ("simple") "github.user" ("emacswatcher") "core.repositoryformatversion" ("0") "core.filemode" ("true") "core.bare" ("false") "core.logallrefupdates" ("true") "remote.origin.url" ("https://github.com/emacswatcher/yasnippet-backsolve.git") "remote.origin.fetch" ("+refs/heads/*:refs/remotes/origin/*") "branch.master.remote" ("origin") "branch.master.merge" ("refs/heads/master") "core.preloadindex" ("true") "log.showsignature" ("false") ...))) (("/home/emacs/yasnippet-backsolve/" . magit-toplevel) . "/home/emacs/yasnippet-backsolve/") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--show-cdup") . "") (("/home/emacs/yasnippet-backsolve/" "rev-parse" "--show-toplevel") . "/home/emacs/yasnippet-backsolve")))
  #<subr call-interactively>(magit-status t nil)
  elmacro-record-command(#<subr call-interactively> magit-status nil nil)
  apply(elmacro-record-command #<subr call-interactively> (magit-status nil nil))
  call-interactively(magit-status nil nil)
  command-execute(magit-status)

Originally filed as vermiculus/magithub#316

"Token not found" error

I install "magithub" from "Melpa"

It depends on "ghub". When I try to auth, it fails with error "Token not found". ghub--auth-source-get always returns nil.

hub browse, then input login, pass works correctly.

I solved auth problem by replacing content of ghub.el dependency locally to https://raw.githubusercontent.com/magit/ghub/c74101ca6235a20ec428ed223ce060a61db26148/ghub.el.

P.S. Do you know, is there any to set specific dependency version (I am not a pro in emacs) to avoid these types of confusing errors?)

error "BUG: missing headers nil"

TL;DR

Added by @tarsius.

We found and patched two bugs in Emacs that resulted in these symptoms.
See https://github.com/magit/ghub/wiki/Known-Issues#emacs-bugs-resulting-in-bug-missing-headers.

I used magithub for some time, and today it stopped working. After some investigation I found that it seems to be ghub-related.

For example, I get an error after doing this:

  1. Remove access token in github settings
  2. Removing ^magithub line from .authinfo.gpg
  3. M-x auth-source-forget-all-cached
  4. M-x ghub-create-token
    After entering Host, Username, Package and not modifying Scopes, I get the following backtrace:
Debugger entered--Lisp error: (error "BUG: missing headers nil")
  signal(error ("BUG: missing headers nil"))
  error("BUG: missing headers %s" nil)
  ghub--handle-response-headers(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/authorizations" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x29d0ab5>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub--handle-response(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/authorizations" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x29d0ab5>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub--retrieve("{\"scopes\":[\"repo\",\"user\",\"notifications\"],\"note\":\"Emacs package magithub @ fkhodkov-note\"}" #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/authorizations" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x29d0ab5>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  #f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response headers in `ghub-response-headers'.\n\nMETHOD is the HTTP method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return JSON, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the\n  method-specific functions as well.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST, to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If no error occurred, then call CALLBACK, unless\n  that is nil.\n\n  If an error occurred, then call ERRORBACK, or if that is nil,\n  then CALLBACK.  ERRORBACK can also be t, in which case an error\n  is signaled instead.  NOERROR is ignored for all asynchronous\n  requests.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACK, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode 0x15ef2e5>)("POST" "/authorizations" ((scopes "repo" "user" "notifications") (note . "Emacs package magithub @ fkhodkov-note")) :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :username "fkhodkov" :auth basic :host "api.github.com" :callback nil :errorback nil :extra nil)
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response headers in `ghub-response-headers'.\n\nMETHOD is the HTTP method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return JSON, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the\n  method-specific functions as well.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST, to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If no error occurred, then call CALLBACK, unless\n  that is nil.\n\n  If an error occurred, then call ERRORBACK, or if that is nil,\n  then CALLBACK.  ERRORBACK can also be t, in which case an error\n  is signaled instead.  NOERROR is ignored for all asynchronous\n  requests.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACK, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode 0x15ef2e5>) ("POST" "/authorizations" ((scopes "repo" "user" "notifications") (note . "Emacs package magithub @ fkhodkov-note")) :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :username "fkhodkov" :auth basic :host "api.github.com" :callback nil :errorback nil :extra nil))
  magithub-debug--ghub-request-wrapper(#f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response headers in `ghub-response-headers'.\n\nMETHOD is the HTTP method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return JSON, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the\n  method-specific functions as well.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST, to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If no error occurred, then call CALLBACK, unless\n  that is nil.\n\n  If an error occurred, then call ERRORBACK, or if that is nil,\n  then CALLBACK.  ERRORBACK can also be t, in which case an error\n  is signaled instead.  NOERROR is ignored for all asynchronous\n  requests.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACK, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode 0x15ef2e5>) "POST" "/authorizations" ((scopes "repo" "user" "notifications") (note . "Emacs package magithub @ fkhodkov-note")) :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :username "fkhodkov" :auth basic :host "api.github.com" :callback nil :errorback nil :extra nil)
  apply(magithub-debug--ghub-request-wrapper #f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response headers in `ghub-response-headers'.\n\nMETHOD is the HTTP method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return JSON, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the\n  method-specific functions as well.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST, to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If no error occurred, then call CALLBACK, unless\n  that is nil.\n\n  If an error occurred, then call ERRORBACK, or if that is nil,\n  then CALLBACK.  ERRORBACK can also be t, in which case an error\n  is signaled instead.  NOERROR is ignored for all asynchronous\n  requests.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACK, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode 0x15ef2e5>) ("POST" "/authorizations" ((scopes "repo" "user" "notifications") (note . "Emacs package magithub @ fkhodkov-note")) :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :username "fkhodkov" :auth basic :host "api.github.com" :callback nil :errorback nil :extra nil))
  ghub-request("POST" "/authorizations" ((scopes "repo" "user" "notifications") (note . "Emacs package magithub @ fkhodkov-note")) :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :username "fkhodkov" :auth basic :host "api.github.com" :callback nil :errorback nil :extra nil)
  ghub-post("/authorizations" ((scopes "repo" "user" "notifications") (note . "Emacs package magithub @ fkhodkov-note")) :username "fkhodkov" :auth basic :host "api.github.com")
  ghub-create-token("api.github.com" "fkhodkov" magithub ("repo" "user" "notifications"))
  funcall-interactively(ghub-create-token "api.github.com" "fkhodkov" magithub ("repo" "user" "notifications"))
  call-interactively(ghub-create-token record nil)
  command-execute(ghub-create-token record)
  execute-extended-command(nil "ghub-create-token" nil)
  funcall-interactively(execute-extended-command nil "ghub-create-token" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

, even though in github settings I see newly-created token. I can regenerate token and manually store it in .authinfo.gpg, but then I'll get similar error after every attempt to do anything magithub-related. For example, this I get after trying to magithub-clone the ghub's repo:

Debugger entered--Lisp error: (error "BUG: missing headers nil")
  signal(error ("BUG: missing headers nil"))
  error("BUG: missing headers %s" nil)
  ghub--handle-response-headers(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/magit/ghub" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "GET" :headers #f(compiled-function () #<bytecode 0x273b74d>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub--handle-response(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/magit/ghub" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "GET" :headers #f(compiled-function () #<bytecode 0x273b74d>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub--retrieve(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/magit/ghub" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "GET" :headers #f(compiled-function () #<bytecode 0x273b74d>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  #f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response headers in `ghub-response-headers'.\n\nMETHOD is the HTTP method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return JSON, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the\n  method-specific functions as well.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST, to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If no error occurred, then call CALLBACK, unless\n  that is nil.\n\n  If an error occurred, then call ERRORBACK, or if that is nil,\n  then CALLBACK.  ERRORBACK can also be t, in which case an error\n  is signaled instead.  NOERROR is ignored for all asynchronous\n  requests.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACK, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode 0x15ef2e5>)("GET" "/repos/magit/ghub" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil)
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response headers in `ghub-response-headers'.\n\nMETHOD is the HTTP method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return JSON, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the\n  method-specific functions as well.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST, to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If no error occurred, then call CALLBACK, unless\n  that is nil.\n\n  If an error occurred, then call ERRORBACK, or if that is nil,\n  then CALLBACK.  ERRORBACK can also be t, in which case an error\n  is signaled instead.  NOERROR is ignored for all asynchronous\n  requests.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACK, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode 0x15ef2e5>) ("GET" "/repos/magit/ghub" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil))
  magithub-debug--ghub-request-wrapper(#f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response headers in `ghub-response-headers'.\n\nMETHOD is the HTTP method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return JSON, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the\n  method-specific functions as well.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST, to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If no error occurred, then call CALLBACK, unless\n  that is nil.\n\n  If an error occurred, then call ERRORBACK, or if that is nil,\n  then CALLBACK.  ERRORBACK can also be t, in which case an error\n  is signaled instead.  NOERROR is ignored for all asynchronous\n  requests.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACK, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode 0x15ef2e5>) "GET" "/repos/magit/ghub" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil)
  apply(magithub-debug--ghub-request-wrapper #f(compiled-function (arg1 arg2 &rest rest) "Make a request for RESOURCE and return the response body.\n\nAlso place the response headers in `ghub-response-headers'.\n\nMETHOD is the HTTP method, given as a string.\nRESOURCE is the resource to access, given as a string beginning\n  with a slash.\n\nPARAMS, QUERY, PAYLOAD and HEADERS are alists used to specify\n  data.  The Github API documentation is vague on how data has\n  to be transmitted and for a particular resource usually just\n  talks about \"parameters\".  Generally speaking when the METHOD\n  is \"HEAD\" or \"GET\", then they have to be transmitted as a\n  query, otherwise as a payload.\nUse PARAMS to automatically transmit like QUERY or PAYLOAD would\n  depending on METHOD.\nUse QUERY to explicitly transmit data as a query.\nUse PAYLOAD to explicitly transmit data as a payload.\n  Instead of an alist, PAYLOAD may also be a string, in which\n  case it gets encoded as UTF-8 but is otherwise transmitted as-is.\nUse HEADERS for those rare resources that require that the data\n  is transmitted as headers instead of as a query or payload.\n  When that is the case, then the API documentation usually\n  mentions it explicitly.\n\nIf SILENT is non-nil, then don't message progress reports and\n  the like.\n\nIf UNPAGINATE is t, then make as many requests as necessary to\n  get all values.  If UNPAGINATE is a natural number, then get\n  at most that many pages.  For any other non-nil value raise\n  an error.\nIf NOERROR is non-nil, then do not raise an error if the request\n  fails and return nil instead.  If NOERROR is `return', then\n  return the error payload instead of nil.\nIf READER is non-nil, then it is used to read and return from the\n  response buffer.  The default is `ghub--read-json-payload'.\n  For the very few resources that do not return JSON, you might\n  want to use `ghub--decode-payload'.\n\nIf USERNAME is non-nil, then make a request on behalf of that\n  user.  It is better to specify the user using the Git variable\n  `github.user' for \"api.github.com\", or `github.HOST.user' if\n  connecting to a Github Enterprise instance.\n\nEach package that uses `ghub' should use its own token. If AUTH\n  is nil, then the generic `ghub' token is used instead.  This\n  is only acceptable for personal utilities.  A packages that\n  is distributed to other users should always use this argument\n  to identify itself, using a symbol matching its name.\n\n  Package authors who find this inconvenient should write a\n  wrapper around this function and possibly for the\n  method-specific functions as well.\n\n  Some symbols have a special meaning.  `none' means to make an\n  unauthorized request.  `basic' means to make a password based\n  request.  If the value is a string, then it is assumed to be\n  a valid token.  `basic' and an explicit token string are only\n  intended for internal and debugging uses.\n\n  If AUTH is a package symbol, then the scopes are specified\n  using the variable `AUTH-github-token-scopes'.  It is an error\n  if that is not specified.  See `ghub-github-token-scopes' for\n  an example.\n\nIf HOST is non-nil, then connect to that Github instance.  This\n  defaults to \"api.github.com\".  When a repository is connected\n  to a Github Enterprise instance, then it is better to specify\n  that using the Git variable `github.host' instead of using this\n  argument.\n\nIf FORGE is `gitlab', then connect to Gitlab.com or, depending\n  on HOST, to another Gitlab instance.  This is only intended for\n  internal use.  Instead of using this argument you should use\n  function `glab-request' and other `glab-*' functions.\n\nIf CALLBACK and/or ERRORBACK is non-nil, then make one or more\n  asynchronous requests and call CALLBACK or ERRORBACK when\n  finished.  If no error occurred, then call CALLBACK, unless\n  that is nil.\n\n  If an error occurred, then call ERRORBACK, or if that is nil,\n  then CALLBACK.  ERRORBACK can also be t, in which case an error\n  is signaled instead.  NOERROR is ignored for all asynchronous\n  requests.\n\nBoth callbacks are called with four arguments.\n  1. For CALLBACK, the combined value of the retrieved pages.\n     For ERRORBACK, the error that occured when retrieving the\n     last page.\n  2. The headers of the last page as an alist.\n  3. Status information provided by `url-retrieve'. Its `:error'\n     property holds the same information as ERRORBACK's first\n     argument.\n  4. A `ghub--req' struct, which can be passed to `ghub-continue'\n     (which see) to retrieve the next page, if any." #<bytecode 0x15ef2e5>) ("GET" "/repos/magit/ghub" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil))
  ghub-request("GET" "/repos/magit/ghub" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth magithub :host nil)
  ghubp-request(get "/repos/magit/ghub" nil nil)
  apply(ghubp-request get "/repos/magit/ghub" (nil nil))
  ghubp-get-repos-owner-repo(((owner (login . "magit")) (name . "ghub")))
  byte-code("\302 \303 C\304\030\211\305\306B\002\242B\240\210\307\310\311\312\313\005!\314\"\315$\020\316\002!)\262\001\206:\0\211\317\320\002\236A\236A\321\002\236A\322\323\003\003#\266\202\262\001\324\321\002\"\325\326\011\003\304\005%\002\001D\207" [ghubp-contextualize-function magithub-clone-default-directory magithub-clone--get-repo ghubp-get-context nil auth magithub make-byte-code 0 "\300\242\207" vconcat vector [] 1 ghubp-get-repos-owner-repo login owner name user-error "Repository %s/%s does not exist" alist-get read-directory-name "Destination: "] 9)
  call-interactively(magithub-clone record nil)
  command-execute(magithub-clone record)
  execute-extended-command(nil "magithub-clone" nil)
  funcall-interactively(execute-extended-command nil "magithub-clone" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

auth file problem

I have failed to auth with ~/.authinfo.gpg file, according to this doc:

It will look for .authinfo or .netrc, and I succeed to auth with authinfo file.

Error: Multibyte text in HTTP request

Reproduce with:

(ghub-post "/markdown" nil '((text . "‘guess’")))

Note the special quotes around guess. This particular text is copied from a help-mode buffer.

Debugger entered--Lisp error: (error "Multibyte text in HTTP request: POST /markdown HTTP/1.1
MIME-Version: 1.0
Connection: keep-alive
Extension: Security/Digest Security/SSL
Host: api.github.com
Accept-encoding: gzip
Accept: */*
User-Agent: URL/Emacs
Cookie: HttpOnly=nil; logged_in=no
Content-Type: application/json
Authorization: token ac3ee799f0108409d026deeb1bb51892e9b4c8de
Content-length: 18

{\"text\":\"‘guess’\"}")
  signal(error ("Multibyte text in HTTP request: POST /markdown HTTP/1.1
\nMIME-Version: 1.0
\nConnection: keep-alive
\nExtension: Security/Digest Security/SSL
\nHost: api.github.com
\nAccept-encoding: gzip
\nAccept: */*
\nUser-Agent: URL/Emacs
\nCookie: HttpOnly=nil; logged_in=no
\nContent-Type: application/json
\nAuthorization: token ac3ee799f0108409d026deeb1bb51892e9b4c8de
\nContent-length: 18
\n
\n{\"text\":\"‘guess’\"}"))
  error("Multibyte text in HTTP request: %s" "POST /markdown HTTP/1.1
\nMIME-Version: 1.0
\nConnection: keep-alive
\nExtension: Security/Digest Security/SSL
\nHost: api.github.com
\nAccept-encoding: gzip
\nAccept: */*
\nUser-Agent: URL/Emacs
\nCookie: HttpOnly=nil; logged_in=no
\nContent-Type: application/json
\nAuthorization: token ac3ee799f0108409d026deeb1bb51892e9b4c8de
\nContent-length: 18
\n
\n{\"text\":\"‘guess’\"}")
  url-http-create-request()
  url-http([cl-struct-url "https" nil nil "api.github.com" nil "/markdown" nil nil t nil t] #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] (nil) nil tls)
  url-https([cl-struct-url "https" nil nil "api.github.com" nil "/markdown" nil nil t nil t] #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] (nil))
  url-retrieve-internal("https://api.github.com/markdown" #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] (nil) nil nil)
  url-retrieve("https://api.github.com/markdown" #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] nil nil nil)
  url-retrieve-synchronously("https://api.github.com/markdown")
  (set-buffer (url-retrieve-synchronously (concat ghub-base-url resource p)))
  (save-current-buffer (set-buffer (url-retrieve-synchronously (concat ghub-base-url resource p))) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (save-restriction (narrow-to-region (point) url-http-end-of-headers) (and (setq link (mail-fetch-field "Link")) (setq link (car (rassoc (list "rel=\"next\"") (mapcar ... ...)))) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link)))) (goto-char (1+ url-http-end-of-headers)) (setq body (ghub--read-response)) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (cond ((eq url-http-response-status 301) (let nil (signal (quote ghub-301) (list method resource p d body)))) ((eq url-http-response-status 400) (let nil (signal (quote ghub-400) (list method resource p d body)))) ((eq url-http-response-status 404) (let nil (signal (quote ghub-404) (list method resource p d body)))) ((eq url-http-response-status 422) (let nil (signal (quote ghub-422) (list method resource p d body)))) (t (let nil (signal (quote ghub-http-error) (list url-http-response-status method resource p d body)))))) (if (and link ghub-unpaginate) (nconc body (ghub--request method resource (cons (cons (quote page) link) (cl-delete (quote page) params :key (function car))) data noerror)) body)))
  (let* ((p (and params (concat "?" (ghub--url-encode-params params)))) (d (and data (json-encode-list data))) (url-request-extra-headers (cons (quote ("Content-Type" . "application/json")) (let* ((token (and t ...))) (if token (list (cons "Authorization" ...)))))) (url-request-method method) (url-request-data d)) (save-current-buffer (set-buffer (url-retrieve-synchronously (concat ghub-base-url resource p))) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (save-restriction (narrow-to-region (point) url-http-end-of-headers) (and (setq link (mail-fetch-field "Link")) (setq link (car (rassoc ... ...))) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link)))) (goto-char (1+ url-http-end-of-headers)) (setq body (ghub--read-response)) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (cond ((eq url-http-response-status 301) (let nil (signal ... ...))) ((eq url-http-response-status 400) (let nil (signal ... ...))) ((eq url-http-response-status 404) (let nil (signal ... ...))) ((eq url-http-response-status 422) (let nil (signal ... ...))) (t (let nil (signal ... ...))))) (if (and link ghub-unpaginate) (nconc body (ghub--request method resource (cons (cons ... link) (cl-delete ... params :key ...)) data noerror)) body))))
  (closure (url-http-end-of-headers url-http-response-status t) (method resource &optional params data noerror) (let* ((p (and params (concat "?" (ghub--url-encode-params params)))) (d (and data (json-encode-list data))) (url-request-extra-headers (cons (quote ("Content-Type" . "application/json")) (let* ((token ...)) (if token (list ...))))) (url-request-method method) (url-request-data d)) (save-current-buffer (set-buffer (url-retrieve-synchronously (concat ghub-base-url resource p))) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (save-restriction (narrow-to-region (point) url-http-end-of-headers) (and (setq link (mail-fetch-field "Link")) (setq link (car ...)) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link)))) (goto-char (1+ url-http-end-of-headers)) (setq body (ghub--read-response)) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (cond ((eq url-http-response-status 301) (let nil ...)) ((eq url-http-response-status 400) (let nil ...)) ((eq url-http-response-status 404) (let nil ...)) ((eq url-http-response-status 422) (let nil ...)) (t (let nil ...)))) (if (and link ghub-unpaginate) (nconc body (ghub--request method resource (cons ... ...) data noerror)) body)))))("POST" "/markdown" nil ((text . "‘guess’")) nil)
  apply((closure (url-http-end-of-headers url-http-response-status t) (method resource &optional params data noerror) (let* ((p (and params (concat "?" (ghub--url-encode-params params)))) (d (and data (json-encode-list data))) (url-request-extra-headers (cons (quote ("Content-Type" . "application/json")) (let* ((token ...)) (if token (list ...))))) (url-request-method method) (url-request-data d)) (save-current-buffer (set-buffer (url-retrieve-synchronously (concat ghub-base-url resource p))) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (save-restriction (narrow-to-region (point) url-http-end-of-headers) (and (setq link (mail-fetch-field "Link")) (setq link (car ...)) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link)))) (goto-char (1+ url-http-end-of-headers)) (setq body (ghub--read-response)) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (cond ((eq url-http-response-status 301) (let nil ...)) ((eq url-http-response-status 400) (let nil ...)) ((eq url-http-response-status 404) (let nil ...)) ((eq url-http-response-status 422) (let nil ...)) (t (let nil ...)))) (if (and link ghub-unpaginate) (nconc body (ghub--request method resource (cons ... ...) data noerror)) body))))) ("POST" "/markdown" nil ((text . "‘guess’")) nil))
  (if (and (listp magithub-debug-mode) (memq (quote dry-api) magithub-debug-mode)) nil (apply oldfun args))
  magithub-debug--ghub-request-wrapper((closure (url-http-end-of-headers url-http-response-status t) (method resource &optional params data noerror) (let* ((p (and params (concat "?" (ghub--url-encode-params params)))) (d (and data (json-encode-list data))) (url-request-extra-headers (cons (quote ("Content-Type" . "application/json")) (let* ((token ...)) (if token (list ...))))) (url-request-method method) (url-request-data d)) (save-current-buffer (set-buffer (url-retrieve-synchronously (concat ghub-base-url resource p))) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (save-restriction (narrow-to-region (point) url-http-end-of-headers) (and (setq link (mail-fetch-field "Link")) (setq link (car ...)) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link)))) (goto-char (1+ url-http-end-of-headers)) (setq body (ghub--read-response)) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (cond ((eq url-http-response-status 301) (let nil ...)) ((eq url-http-response-status 400) (let nil ...)) ((eq url-http-response-status 404) (let nil ...)) ((eq url-http-response-status 422) (let nil ...)) (t (let nil ...)))) (if (and link ghub-unpaginate) (nconc body (ghub--request method resource (cons ... ...) data noerror)) body))))) "POST" "/markdown" nil ((text . "‘guess’")) nil)
  apply(magithub-debug--ghub-request-wrapper (closure (url-http-end-of-headers url-http-response-status t) (method resource &optional params data noerror) (let* ((p (and params (concat "?" (ghub--url-encode-params params)))) (d (and data (json-encode-list data))) (url-request-extra-headers (cons (quote ("Content-Type" . "application/json")) (let* ((token ...)) (if token (list ...))))) (url-request-method method) (url-request-data d)) (save-current-buffer (set-buffer (url-retrieve-synchronously (concat ghub-base-url resource p))) (set-buffer-multibyte t) (let (link body) (goto-char (point-min)) (save-restriction (narrow-to-region (point) url-http-end-of-headers) (and (setq link (mail-fetch-field "Link")) (setq link (car ...)) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link)))) (goto-char (1+ url-http-end-of-headers)) (setq body (ghub--read-response)) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (cond ((eq url-http-response-status 301) (let nil ...)) ((eq url-http-response-status 400) (let nil ...)) ((eq url-http-response-status 404) (let nil ...)) ((eq url-http-response-status 422) (let nil ...)) (t (let nil ...)))) (if (and link ghub-unpaginate) (nconc body (ghub--request method resource (cons ... ...) data noerror)) body))))) ("POST" "/markdown" nil ((text . "‘guess’")) nil))
  ghub--request("POST" "/markdown" nil ((text . "‘guess’")) nil)
  ghub-post("/markdown" nil ((text . "‘guess’")))

Expose response headers

There are lots of neat things that could be done by paying attention to response headers:

I don't expect ghub to handle these (after all, it's the miniscule GitHub client), but it wouldn't be crazy for ghub+ to handle them smartly if they were made available.

Since we want to keep the main JSON response as simple as possible to use, it would probably be best to use something like this:

(defvar ghub-response-headers nil
  "An alist of response headers from the last request.
When a method is called, this variable is reset to be an alist of
the headers for that method.

For example, you should expect to see at least the following
headers after calling \(ghub-get \"/meta\"\):

    \(\(request . \"/meta\"\)
     \(method . \"GET\"\)
     \(\"Status\" . \"200 OK\"\)
     \(\"X-RateLimit-Limit\" . \"60\"\)
     \(\"X-RateLimit-Remaining\" . \"58\"\)
     \(\"X-RateLimit-Reset\" . \"1495154422\"\)\)")

Hangs when (ghub--get-access-token) is nil

When no access token is configured, (ghub-get "/repos/tarsius/github") hangs here:

Debugger entered--Lisp error: (quit)
  url-retrieve-synchronously("https://api.github.com/repos/tarsius/ghub")
  (set-buffer (url-retrieve-synchronously (concat ghub--root-endpoint resource p)))
  (save-current-buffer (set-buffer (url-retrieve-synchronously (concat ghub--root-endpoint resource p))) (let (link body) (goto-char (point-min)) (save-restriction (narrow-to-region (point) url-http-end-of-headers) (and (setq link (mail-fetch-field "Link")) (setq link (car (rassoc (list "rel=\"next\"") (mapcar ... ...)))) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link)))) (goto-char (1+ url-http-end-of-headers)) (setq body (ghub--read-response)) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (cond ((eq url-http-response-status 301) (let nil (signal (quote ghub-301) (list method resource p d body)))) ((eq url-http-response-status 400) (let nil (signal (quote ghub-400) (list method resource p d body)))) ((eq url-http-response-status 404) (let nil (signal (quote ghub-404) (list method resource p d body)))) ((eq url-http-response-status 422) (let nil (signal (quote ghub-422) (list method resource p d body)))) (t (let nil (signal (quote ghub-http-error) (list url-http-response-status method resource p d body)))))) (if (and link ghub-unpaginate) (nconc body (ghub--request method resource (cons (cons (quote page) link) (cl-delete (quote page) params :key (function car))) data noerror)) body)))
  (let* ((p (and params (concat "?" (ghub--url-encode-params params)))) (d (and data (json-encode-list data))) (token (ghub--get-access-token)) (url-request-extra-headers (list (quote ("Content-Type" . "application/json")) (cons "Authorization" (concat "token " token)))) (url-request-method method) (url-request-data d)) (if (or t token) nil (signal (quote ghub-unauthenticated) (list method resource p d))) (save-current-buffer (set-buffer (url-retrieve-synchronously (concat ghub--root-endpoint resource p))) (let (link body) (goto-char (point-min)) (save-restriction (narrow-to-region (point) url-http-end-of-headers) (and (setq link (mail-fetch-field "Link")) (setq link (car (rassoc ... ...))) (string-match "[?&]page=\\([^&>]+\\)" link) (setq link (match-string 1 link)))) (goto-char (1+ url-http-end-of-headers)) (setq body (ghub--read-response)) (if (or noerror (= (/ url-http-response-status 100) 2)) nil (cond ((eq url-http-response-status 301) (let nil (signal ... ...))) ((eq url-http-response-status 400) (let nil (signal ... ...))) ((eq url-http-response-status 404) (let nil (signal ... ...))) ((eq url-http-response-status 422) (let nil (signal ... ...))) (t (let nil (signal ... ...))))) (if (and link ghub-unpaginate) (nconc body (ghub--request method resource (cons (cons ... link) (cl-delete ... params :key ...)) data noerror)) body))))
  ghub--request("GET" "/repos/tarsius/ghub" nil nil nil)
  ghub-get("/repos/tarsius/ghub")

creating an issue doest work

I have configured and connected ghub:

ELISP> (ghub-get "/user")
((login . "anquegi")
 (id . 2518346)
 (avatar_url . "https://avatars3.githubusercontent.com/u/2518346?v=4")
 (gravatar_id . "")
 (url . "https://api.github.com/users/anquegi")
 (html_url . "https://github.com/anquegi")
 (followers_url . "https://api.github.com/users/anquegi/followers")
 (following_url . "https://api.github.com/users/anquegi/following{/other_user}")
 (gists_url . "https://api.github.com/users/anquegi/gists{/gist_id}")
 (starred_url . "https://api.github.com/users/anquegi/starred{/owner}{/repo}")
 (subscriptions_url . "https://api.github.com/users/anquegi/subscriptions")
 (organizations_url . "https://api.github.com/users/anquegi/orgs")
 (repos_url . "https://api.github.com/users/anquegi/repos")
 (events_url . "https://api.github.com/users/anquegi/events{/privacy}")
 (received_events_url . "https://api.github.com/users/anquegi/received_events")
 (type . "User")
 (site_admin)
 (name . "Antonio Juan Querol")
 (company . "@ElevenPaths Telefónica")
 (blog . "")
 (location . "Valencia")
 (email . "[email protected]")
 (hireable)
 (bio)
 (public_repos . 28)
 (public_gists . 2)
 (followers . 5)
 (following . 7)
 (created_at . "2012-10-09T08:13:26Z")
 (updated_at . "2017-09-01T12:10:04Z")
 (private_gists . 0)
 (total_private_repos . 17)
 (owned_private_repos . 16)
 (disk_usage . 1050266)
 (collaborators . 6)
 (two_factor_authentication . t)
 (plan
  (name . "developer")
  (space . 976562499)
  (collaborators . 0)
  (private_repos . 9999)))

but when submitting a new use I always get the following error:

Not Found: "POST", "/repos/////issues", nil, "{\"title\":\"separate repositories clip and clap into submodules\",\"body\":\"I think that clip and clap should go in separate submodules\"}", ((message . "Not Found") (documentation_url . "https://developer.github.com/v3"))
Saving file /Users/toni/.emacs.d/magithub/cache...
Wrote /Users/toni/.emacs.d/magithub/cache
*CLING*CLING*

and in the cache:

#s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ((nil condition-case e (or (ghubp-get-repos-owner-repo (quote nil)) (and (not magithub--api-available-p) sparse-repo)) (ghub-404 nil)) ((22958 19819 624998 0))))

Never sent 2FA code, though prompted for one. (magit-2.13.0, ghub 2.0.1)

From a status buffer over TRAMP I run:

  1. b Y

  2. I am prompted that I do not have a token for the necessary request and given a choice to generate one.

  3. I see the prompt Two-factor authentication code: but my device is never sent an OTP.

Anything I can do to help debug this? I use 2FA with hub just fine so I don't think it's something wrong with my device setup.

Manual token not being detected

Emacs Version: GNU Emacs 25.3.1 (x86_64-apple-darwin16.5.0, NS appkit-1504.82 Version 10.12.4 (Build 16E195)) of 2017-10-24

~/.authinfo:
machine api.github.com login juliusdelta^magithub password 1111111111111...

Emacs Config:
(setq auth-sources '("~/.authinfo"))

  (use-package magithub
    :after magit
    :ensure t
    :config (magithub-feature-autoinject t))

I do also have magit & evil-magit installed.

Issue: Whenever I run magit-status I get prompted by the setup wizard to auth my Github credentials. I thought this wouldn't be possible cause I have 2FA enabled.

I'm under the impression ghub looks for auth-sources files and pulls info from there before starting the wizard. It doesn't seem to be doing that. My token is also stored as Emacs package magithub @ ... like the wizard says. Unsure what the issue is or how to troubleshoot further.

When I do just follow the wizard, I get json readtable error, but like I said I thought I couldn't use the wizard with 2FA.

Auth failure - token is nil

Hi,

In short, ghub-auth fails because ghub-token returns nil. Stack trace can be found lower in the issue.

Steps to reproduce

  1. Open magit status buffer.
  2. Press b y (or invoke any other action requiring auth).
  3. Enter email, password and one-time password.

Observed behavior

Error message is shown in the echo area - wrong-type-argument stringp nil.

Expected behavior

No errors 😸


More information that might be helpful for debugging

Once I enable debug-on-error I see following stack trace.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  encode-coding-string(nil utf-8)
  ghub--auth("api.github.com" magit "d12frosted" nil)
  #f(compiled-function () #<bytecode 0x44dd4c89>)()
  ghub--retrieve(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/syl20bnr/spacemacs/pulls" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "GET" :headers #f(compiled-function () #<bytecode 0x44dd4c89>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub-request("GET" "/repos/syl20bnr/spacemacs/pulls" nil :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :username nil :auth magit :host nil :callback nil :errorback nil :extra nil)
  ghub-get("/repos/syl20bnr/spacemacs/pulls" nil :auth magit)
  magit-read-pull-request("Checkout pull request")
  byte-code("\300\301!C\207" [magit-read-pull-request "Checkout pull request"] 2)
  call-interactively(magit-checkout-pull-request)
  magit-invoke-popup-action(121)
  funcall-interactively(magit-invoke-popup-action 121)
  call-interactively(magit-invoke-popup-action nil nil)
  command-execute(magit-invoke-popup-action)

I've tried to evaluate (ghub--token "api.github.com" "d12frosted" 'magit nil nil), but it really returns nil.

What can I do to debug it further? Any help will be appreciated.

P. S. This is the first time I have any issues with ghub auth. And only on this machine.

Finishing v2

Major tasks:

  • #23 Move away from let-bindings.
  • #25 Guide the user in the creation of tokens.
  • #35 Error sending a multibyte data payload.
  • Finish documentation.
  • Handle shitty 500 responses.
  • #43 Controlled paging.
  • #47 Support 2fa during token creation.
  • #48 Support Graphql.
  • #49 Support Gitlab to the extend possible. (I.e. no setup wizard and graphql.)
  • Asynchronous requests.

Minor tasks:

  • Download existing matching token. It appears that is not possible for "developer tokens".
  • Verify scopes. Implemented as magit-token-scopes.

There were a few questions regarding the API:

  • Should auth be placed earlier? Using keyword arguments now.
  • How should username+package be stored? Using USER^PACKAGE.
  • Should we use the same format for the ghub package, instead of the special case of just using username? Yes.

Some solution is needed for controlled paging

The unpaginate argument is the idealized behavior of any API request, but it's often inappropriate when working with very large repositories with many hundreds (perhaps even thousands) of objects. In these cases, it's a better user experience to actually page the results.

Related vermiculus/magithub#152.

Crashes if url-privacy-level is 'paranoid

Execute this:

(setq url-privacy-level 'paranoid)

then, try to fetch the PR list in a git project through Magit. You get

ghub--read-json-payload: JSON readtable error: 82

which is not really helpful. If you start debugging, you get

Result: "Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.\n"

Would it be possible that ghub either (1) tells us there is configuration problem with privacy level or (2) use a random string for the user-agent?

URL buffers are left hanging around

url.el obviously doesn't kill buffers retrieved. During a longer session, this ends up in many, many buffers just hanging around in memory. We should probably kill them.

Some of these buffers contain sensitive information, so it would definitely be good to kill them off when we're done. It might not be a perfect solution, but it would minimize the hole. (See value of (buffer-local-variables *buf*) on a buffer generated by url.el via ghub.)

Can't use token wizard with 2FA

When I try to use magit-checkout-pull-request, the token wizard pops up and asks me for my GitHub username and password for https://api.github.com. I enter those. Then it prompts again with a different URL https://api.github.com/authorizations?per_page=100. I enter the credentials again. Finally the message ghub--handle-response-error: HTTP Error: 400, "Bad Request", "and Github didn't return JSON" is displayed.

Checking the *http api.github.com:443* buffer, I can see that GitHub rejected the request because no 2FA code was provided. The code seems to handle 2FA in the ghub--basic-auth-errorback function but it's not used in ghub-create-token.

Guide the user in the creation of tokens

The pu branch implements both #23 and #25 [edit: I believe this was supposed to be #24]. Both features are not complete yet and subject to change, but I am already using this branch in production and so far it is holding together well.

error message about authentication is uninformative

As far as I've experienced, there's just a single, generic message about authentication failing. It would be helpful in debugging authentication problems if there's a more informative error message. For instance, I made a mistake and called my file ~/authinfo.gpg instead of ~/.authinfo.gpg. If the error message had said that the auth file couldn't be found that would have made chasing this down much easier.

HTTP Error: 502, "Bad gateway", "/graphql"

I'm still getting an error similar to #20 on a fairly large repo (running 20190107.1955). I can pull notifications, and that works okay, but trying to do F-y results in:

Pulling REPO...
error in process filter: ghub--signal-error: HTTP Error: 502, "Bad gateway", "/graphql", ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `CC2C:4FEA:A1771C1:CBF40CE:5C33F7E5` when reporting this issue."))))
error in process filter: HTTP Error: 502, "Bad gateway", "/graphql", ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `CC2C:4FEA:A1771C1:CBF40CE:5C33F7E5` when reporting this issue."))))

Unlike above however, even if I restart the magit buffer there are no pull requests or issues listed.
Let me know if there's more debug info that could help.

Thanks!

How to use SPADES assembler to de novo assembly contigs

How to use SPADES assembler to de novo assembly contigs

I have Contigs that were generated true the SPADES assembler I then used mitochondrial genomes to search for contigs that match with MITOCHONDRIAL GENOME . Now I would like to find out, how can I use the SPADES assembler to join those contigs into scaffolds?. I dont have a feference for my species. I am in need of the command that I need to run in order to do this job.
I am running SPADES 3.11.1
Thank you

"bad gateway" when talking to github

I'm using current git of magit, ghub, forge, and graphql. I hope this is the right place to file this bug. I'm getting quite a few errors like this. I' having a hard time interpreting the error so would aprreciate any clues!

Thanks as always.

Debugger entered--Lisp error: (ghub-http-error 502 "Bad gateway" "/graphql" ((data . "null") (errors ((message . "Something went wrong while executing your query. T...")))))
  signal(ghub-http-error (502 "Bad gateway" "/graphql" ((data . "null") (errors ((message . "Something went wrong while executing your query. T..."))))))
  ghub--signal-error((error http 502) ((data . "null") (errors ((message . "Something went wrong while execu...")))) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x4243469>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4243489>) :errorback nil :value nil :extra nil :query (query (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIzMDc4NTU2MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMyOTkyNjAwNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNzYwODczNw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQzNjIyOTM5Ng__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMwNTM2MjY0NQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNjkyNDU2Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjI0MTAzNzE3Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyOTQxMzMyOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIwODI1Njg0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIxMDgyMDY0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyNjQ2OTY1MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5Mzc4MzAwOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5NDE0NTc0Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIwNjY0ODA3Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NTY3OA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NzEzMQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTYwMTA1Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzYxMjM3NDQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMxMTczMTA6Mzg4Nzk1OTQz [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEyMzE_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMyNDc0Nzo0MzU4NjEwNjc_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTk2ODI0NDY5OjQwMzc3NDA0Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6NDM1NjkyMDg2 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6MTk1MDkwMTY1 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIxMjU1NjQxNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEzOTQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk2NTc4MDU_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTkyNjk0Mjk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MjczMzg5Njk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk0Mjc3Nzg_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE1MDEzMjMzMzo0MzQ4NjE1MzY_ [...] (repository ... ...)) ...) :variables nil :until nil :buffer #<killed buffer> :pages 1))
  ghub--handle-response-error((:error (error http 502) :peer (:certificates ((:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") (:version 3 :serial-number "04:e1:e7:a4:dc:5c:f2:f3:6d:c0:2b..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2013-10-22" :valid-to "2028-10-22" :subject "C=US,O=DigiCert Inc,OU=www.digic..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:de:52:af:8c:db:1f:9a:b9:fe:..." :certificate-id "sha1:a0:31:c4:67:82:e6:e6:c6:62:...")) :certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) ((data . "null") (errors ((message . "Something went wrong while execu...")))) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x4243469>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4243489>) :errorback nil :value nil :extra nil :query (query (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIzMDc4NTU2MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMyOTkyNjAwNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNzYwODczNw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQzNjIyOTM5Ng__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMwNTM2MjY0NQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNjkyNDU2Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjI0MTAzNzE3Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyOTQxMzMyOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIwODI1Njg0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIxMDgyMDY0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyNjQ2OTY1MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5Mzc4MzAwOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5NDE0NTc0Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIwNjY0ODA3Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NTY3OA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NzEzMQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTYwMTA1Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzYxMjM3NDQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMxMTczMTA6Mzg4Nzk1OTQz [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEyMzE_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMyNDc0Nzo0MzU4NjEwNjc_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTk2ODI0NDY5OjQwMzc3NDA0Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6NDM1NjkyMDg2 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6MTk1MDkwMTY1 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIxMjU1NjQxNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEzOTQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk2NTc4MDU_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTkyNjk0Mjk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MjczMzg5Njk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk0Mjc3Nzg_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE1MDEzMjMzMzo0MzQ4NjE1MzY_ [...] (repository ... ...)) ...) :variables nil :until nil :buffer #<killed buffer> :pages 1))
  ghub--graphql-handle-response((:error (error http 502) :peer (:certificates ((:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") (:version 3 :serial-number "04:e1:e7:a4:dc:5c:f2:f3:6d:c0:2b..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2013-10-22" :valid-to "2028-10-22" :subject "C=US,O=DigiCert Inc,OU=www.digic..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:de:52:af:8c:db:1f:9a:b9:fe:..." :certificate-id "sha1:a0:31:c4:67:82:e6:e6:c6:62:...")) :certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x4243469>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4243489>) :errorback nil :value nil :extra nil :query (query (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIzMDc4NTU2MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMyOTkyNjAwNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNzYwODczNw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQzNjIyOTM5Ng__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMwNTM2MjY0NQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNjkyNDU2Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjI0MTAzNzE3Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyOTQxMzMyOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIwODI1Njg0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIxMDgyMDY0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyNjQ2OTY1MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5Mzc4MzAwOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5NDE0NTc0Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIwNjY0ODA3Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NTY3OA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NzEzMQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTYwMTA1Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzYxMjM3NDQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMxMTczMTA6Mzg4Nzk1OTQz [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEyMzE_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMyNDc0Nzo0MzU4NjEwNjc_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTk2ODI0NDY5OjQwMzc3NDA0Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6NDM1NjkyMDg2 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6MTk1MDkwMTY1 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIxMjU1NjQxNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEzOTQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk2NTc4MDU_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTkyNjk0Mjk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MjczMzg5Njk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk0Mjc3Nzg_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE1MDEzMjMzMzo0MzQ4NjE1MzY_ [...] (repository ... ...)) ...) :variables nil :until nil :buffer #<killed buffer> :pages 1))
  apply(ghub--graphql-handle-response ((:error (error http 502) :peer (:certificates (... ...) :certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x4243469>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4243489>) :errorback nil :value nil :extra nil :query (query (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIzMDc4NTU2MA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMyOTkyNjAwNA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNzYwODczNw__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQzNjIyOTM5Ng__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMwNTM2MjY0NQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNjkyNDU2Mw__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjI0MTAzNzE3Mg__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyOTQxMzMyOQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIwODI1Njg0MQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIxMDgyMDY0MQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyNjQ2OTY1MA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5Mzc4MzAwOQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5NDE0NTc0Mg__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIwNjY0ODA3Mw__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NTY3OA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NzEzMQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTYwMTA1Mg__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzYxMjM3NDQ_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMxMTczMTA6Mzg4Nzk1OTQz ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEyMzE_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMyNDc0Nzo0MzU4NjEwNjc_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTk2ODI0NDY5OjQwMzc3NDA0Mw__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6NDM1NjkyMDg2 ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6MTk1MDkwMTY1 ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIxMjU1NjQxNA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEzOTQ_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk2NTc4MDU_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTkyNjk0Mjk_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MjczMzg5Njk_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk0Mjc3Nzg_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE1MDEzMjMzMzo0MzQ4NjE1MzY_ ... ...) ...) :variables nil :until nil :buffer #<killed buffer> :pages 1)))
  url-http-activate-callback()
  url-http-chunked-encoding-after-change-function(193 476 283)
  url-http-wait-for-headers-change-function(1 483 482)
  url-http-generic-filter(#<process api.github.com<1>> "HTTP/1.1 502 Bad Gateway\15\nServer: GitHub.com\15\nDate...")
Debugger entered--Lisp error: (ghub-http-error 502 "Bad gateway" "/graphql" ((data . "null") (errors ((message . "Something went wrong while executing your query. T...")))))
  signal(ghub-http-error (502 "Bad gateway" "/graphql" ((data . "null") (errors ((message . "Something went wrong while executing your query. T..."))))))
  ghub--signal-error((error http 502) ((data . "null") (errors ((message . "Something went wrong while execu...")))) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x4243469>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4243489>) :errorback nil :value nil :extra nil :query (query (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIzMDc4NTU2MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMyOTkyNjAwNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNzYwODczNw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQzNjIyOTM5Ng__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMwNTM2MjY0NQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNjkyNDU2Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjI0MTAzNzE3Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyOTQxMzMyOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIwODI1Njg0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIxMDgyMDY0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyNjQ2OTY1MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5Mzc4MzAwOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5NDE0NTc0Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIwNjY0ODA3Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NTY3OA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NzEzMQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTYwMTA1Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzYxMjM3NDQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMxMTczMTA6Mzg4Nzk1OTQz [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEyMzE_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMyNDc0Nzo0MzU4NjEwNjc_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTk2ODI0NDY5OjQwMzc3NDA0Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6NDM1NjkyMDg2 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6MTk1MDkwMTY1 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIxMjU1NjQxNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEzOTQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk2NTc4MDU_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTkyNjk0Mjk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MjczMzg5Njk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk0Mjc3Nzg_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE1MDEzMjMzMzo0MzQ4NjE1MzY_ [...] (repository ... ...)) ...) :variables nil :until nil :buffer #<killed buffer> :pages 1))
  ghub--handle-response-error((:error (error http 502) :peer (:certificates ((:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") (:version 3 :serial-number "04:e1:e7:a4:dc:5c:f2:f3:6d:c0:2b..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2013-10-22" :valid-to "2028-10-22" :subject "C=US,O=DigiCert Inc,OU=www.digic..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:de:52:af:8c:db:1f:9a:b9:fe:..." :certificate-id "sha1:a0:31:c4:67:82:e6:e6:c6:62:...")) :certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) ((data . "null") (errors ((message . "Something went wrong while execu...")))) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x4243469>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4243489>) :errorback nil :value nil :extra nil :query (query (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIzMDc4NTU2MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMyOTkyNjAwNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNzYwODczNw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQzNjIyOTM5Ng__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMwNTM2MjY0NQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNjkyNDU2Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjI0MTAzNzE3Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyOTQxMzMyOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIwODI1Njg0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIxMDgyMDY0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyNjQ2OTY1MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5Mzc4MzAwOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5NDE0NTc0Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIwNjY0ODA3Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NTY3OA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NzEzMQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTYwMTA1Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzYxMjM3NDQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMxMTczMTA6Mzg4Nzk1OTQz [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEyMzE_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMyNDc0Nzo0MzU4NjEwNjc_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTk2ODI0NDY5OjQwMzc3NDA0Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6NDM1NjkyMDg2 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6MTk1MDkwMTY1 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIxMjU1NjQxNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEzOTQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk2NTc4MDU_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTkyNjk0Mjk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MjczMzg5Njk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk0Mjc3Nzg_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE1MDEzMjMzMzo0MzQ4NjE1MzY_ [...] (repository ... ...)) ...) :variables nil :until nil :buffer #<killed buffer> :pages 1))
  ghub--graphql-handle-response((:error (error http 502) :peer (:certificates ((:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") (:version 3 :serial-number "04:e1:e7:a4:dc:5c:f2:f3:6d:c0:2b..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2013-10-22" :valid-to "2028-10-22" :subject "C=US,O=DigiCert Inc,OU=www.digic..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:de:52:af:8c:db:1f:9a:b9:fe:..." :certificate-id "sha1:a0:31:c4:67:82:e6:e6:c6:62:...")) :certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x4243469>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4243489>) :errorback nil :value nil :extra nil :query (query (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIzMDc4NTU2MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMyOTkyNjAwNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNzYwODczNw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQzNjIyOTM5Ng__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMwNTM2MjY0NQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNjkyNDU2Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjI0MTAzNzE3Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyOTQxMzMyOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIwODI1Njg0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIxMDgyMDY0MQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyNjQ2OTY1MA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5Mzc4MzAwOQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5NDE0NTc0Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIwNjY0ODA3Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NTY3OA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NzEzMQ__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTYwMTA1Mg__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzYxMjM3NDQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMxMTczMTA6Mzg4Nzk1OTQz [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEyMzE_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMyNDc0Nzo0MzU4NjEwNjc_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTk2ODI0NDY5OjQwMzc3NDA0Mw__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6NDM1NjkyMDg2 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6MTk1MDkwMTY1 [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIxMjU1NjQxNA__ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEzOTQ_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk2NTc4MDU_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTkyNjk0Mjk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MjczMzg5Njk_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk0Mjc3Nzg_ [...] (repository ... ...)) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE1MDEzMjMzMzo0MzQ4NjE1MzY_ [...] (repository ... ...)) ...) :variables nil :until nil :buffer #<killed buffer> :pages 1))
  apply(ghub--graphql-handle-response ((:error (error http 502) :peer (:certificates (... ...) :certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f..." :issuer "C=US,O=DigiCert Inc,OU=www.digic..." :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francis..." :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:..." :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:...") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x4243469>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4243489>) :errorback nil :value nil :extra nil :query (query (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIzMDc4NTU2MA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMyOTkyNjAwNA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNzYwODczNw__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQzNjIyOTM5Ng__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjMwNTM2MjY0NQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyNjkyNDU2Mw__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjI0MTAzNzE3Mg__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjQyOTQxMzMyOQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIwODI1Njg0MQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgzODM1NzcxOjIxMDgyMDY0MQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyNjQ2OTY1MA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5Mzc4MzAwOQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjI5NDE0NTc0Mg__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIwNjY0ODA3Mw__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NTY3OA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTg2NzEzMQ__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTgwNzMxNjM0OjIyOTYwMTA1Mg__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzYxMjM3NDQ_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMxMTczMTA6Mzg4Nzk1OTQz ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEyMzE_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTMyNDc0Nzo0MzU4NjEwNjc_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTk2ODI0NDY5OjQwMzc3NDA0Mw__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6NDM1NjkyMDg2 ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTcyNTQzOTE6MTk1MDkwMTY1 ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTc2OTAxMDU2OjIxMjU1NjQxNA__ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MzUzNDEzOTQ_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk2NTc4MDU_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTkyNjk0Mjk_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MjczMzg5Njk_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE2MDI1MDAxNTo0MTk0Mjc3Nzg_ ... ...) (_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTE1MDEzMjMzMzo0MzQ4NjE1MzY_ ... ...) ...) :variables nil :until nil :buffer #<killed buffer> :pages 1)))
  url-http-activate-callback()
  url-http-chunked-encoding-after-change-function(193 476 283)
  url-http-wait-for-headers-change-function(1 483 482)
  url-http-generic-filter(#<process api.github.com<1>> "HTTP/1.1 502 Bad Gateway\15\nServer: GitHub.com\15\nDate...")

Accessing bitbucket private repos

In the manual you said you were unable to access any private repos. It seems to be working for me.

If I call

(buck-get "repositories/" '((role . "contributor") (q . "scm=\"git\"")) :unpaginate t :auth 'basic)

and give an app password when prompted I get back all the git repos I have write access to including private repos.

Bitbucket's documentation for the repositories says it returns public repos. However the documentation of the response for the endpoint does include the is_private field.

The users/{username}/repositories endpoint is documented to return private repos, but it doesn't for me, at least not with the app password I created.

Mismatch in documentation vs code for authentication

The README.md and the comments in ghub.el say to use 'password' in the authinfo.gpg however the code in ghub.el uses 'secret' - so if 'password' is used then it fails to retrieve the token, however if 'secret' is used in authinfo then it works as expected.

README.md and ghub.el should be updated to resolve this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.