Comments (14)
Did you update ghub
and Emacs to the same version as used on the other machines?
There are bugs in the auth-source.el
of older Emacsen, which may be relevant here.
from ghub.
Enter email, password and one-time password.
Are you creating a new token?
You should not have to enter your email but your username. Maybe if you provided your username instead of your email, then it would work.
from ghub.
Oh sorry, I meant username instead of email. Just tried again after upgrading all packages and I experience the same error.
Regarding Emacs version - yes, they are the same.
from ghub.
Just adding another datapoint here. I am experiencing the same issue on:
- emacs 26.1
- Ghub 20181112.1755
- Magit 20181124.1733
In case it matters, I am using the .authinfo.gpg
file to store my credentials. Anything I could do to further debug this?
from ghub.
Are you creating a new token?
That's a rather relevant question. In other words does only the setup wizard fail or do you also get this error for normal requests after you have manually created and stored the token?
from ghub.
from ghub.
Getting the same/similar issue.
I make sure to delete the token before token creation. Token seems to be created even though the elisp call fails.
Emacs 26.1
ghub-20181220.1406
magit-20181218.2039
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
(encode-coding-string nil utf-8)
(ghub--auth "api.github.com" forge "jojojames" nil)
(#f(compiled-function () #<bytecode 0x45f64555>))
(ghub--retrieve "{\"query\":\"query ($owner:String!, $name:String!) {\\n repository(owner:$owner, name:$name) { id }\\n }\",\"variables\":{\"owner\":\"emacs-evil\",\"name\":\"evil-collection\"}}" #s(ghub--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 0x45f64555>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
(ghub-request "POST" "/graphql" nil :payload "{\"query\":\"query ($owner:String!, $name:String!) {\\n repository(owner:$owner, name:$name) { id }\\n }\",\"variables\":{\"owner\":\"emacs-evil\",\"name\":\"evil-collection\"}}" :silent nil :username nil :auth forge :host "api.github.com" :callback nil :errorback nil :extra nil :value nil)
(ghub-graphql "query ($owner:String!, $name:String!) {\n repository(owner:$owner, name:$name) { id }\n }" ((owner . "emacs-evil") (name . "evil-collection")) :username nil :auth forge :host "api.github.com")
(ghub--repository-id "emacs-evil" "evil-collection" :username nil :auth forge :host "api.github.com")
(ghub-repository-id "emacs-evil" "evil-collection" :host "api.github.com" :auth forge :forge ghub)
(#f(compiled-function (class host owner name &optional stub) "Return (OUR-ID . THEIR-ID) of the specified repository.\nIf optional STUB is non-nil, then the IDs are not guaranteed to\nbe unique. Otherwise this method has to make an API request to\nretrieve THEIR-ID, the repository's ID on the forge. In that\ncase OUR-ID derives from THEIR-ID and is unique across all\nforges and hosts. " #<bytecode 0x45dc7f61>) forge-github-repository "github.com" "emacs-evil" "evil-collection" nil)
(apply #f(compiled-function (class host owner name &optional stub) "Return (OUR-ID . THEIR-ID) of the specified repository.\nIf optional STUB is non-nil, then the IDs are not guaranteed to\nbe unique. Otherwise this method has to make an API request to\nretrieve THEIR-ID, the repository's ID on the forge. In that\ncase OUR-ID derives from THEIR-ID and is unique across all\nforges and hosts. " #<bytecode 0x45dc7f61>) forge-github-repository ("github.com" "emacs-evil" "evil-collection" nil))
(forge--repository-ids forge-github-repository "github.com" "emacs-evil" "evil-collection" nil)
(#f(compiled-function (&rest rest) "Return the repository identified by HOST, OWNER and NAME." #<bytecode 0x45dc9e39>) ("github.com" "emacs-evil" "evil-collection") "origin" create)
(apply #f(compiled-function (&rest rest) "Return the repository identified by HOST, OWNER and NAME." #<bytecode 0x45dc9e39>) ("github.com" "emacs-evil" "evil-collection") ("origin" create))
(forge-get-repository ("github.com" "emacs-evil" "evil-collection") "origin" create)
(#f(compiled-function (url &optional remote demand) "Return the repository at URL." #<bytecode 0x45dc9dcd>) "https://github.com/emacs-evil/evil-collection" "origin" create)
(apply #f(compiled-function (url &optional remote demand) "Return the repository at URL." #<bytecode 0x45dc9dcd>) "https://github.com/emacs-evil/evil-collection" ("origin" create))
(forge-get-repository "https://github.com/emacs-evil/evil-collection" "origin" create)
(#f(compiled-function (demand &optional remote) "Return the forge repository for the current Git repository." #<bytecode 0x45dc9db5>) create)
(apply #f(compiled-function (demand &optional remote) "Return the forge repository for the current Git repository." #<bytecode 0x45dc9db5>) create nil)
(forge-get-repository create)
(forge-pull)
(funcall-interactively forge-pull)
(call-interactively forge-pull)
(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)
from ghub.
FWIW I had a similar issue which I resolved by clearing auth-source cache (M-x auth-source-forget-all-cached
). Before I did that : (auth-source-search :host "api.github.com" :user "YoungFrog^forge" :max 1)
returned nothing, now it returns something (modify "api.github.com", "YoungFrog" and "forge" according to your situation).
from ghub.
There already was code in ghub--token
and ghub-create-token
that was supposed to deal with auth-source
thinking that "I do not know this" is a "value" that should be cached. But looking at that again I noticed that the latter instance of this kludge was not updated to work around an additional bug only present in Emacs versions before 26.1.
Please verify that a newly created token can now be used on your version of Emacs without invalidating the cache explicitly.
from ghub.
Unfortunately, I don't have that system anymore. But will try to get similar setup and verify that your commit fixes the issue.
P. S. thank you for the fix :)
from ghub.
I still see the same thing.
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
(encode-coding-string nil utf-8)
(ghub--auth "api.github.com" forge "jojojames" nil)
(#f(compiled-function () #<bytecode 0x454d9bf9>))
(ghub--retrieve "{\"query\":\"query ($owner:String!, $name:String!) {\\n repository(owner:$owner, name:$name) { id }\\n }\",\"variables\":{\"owner\":\"emacs-evil\",\"name\":\"evil-collection\"}}" #s(ghub--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 0x454d9bf9>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
(ghub-request "POST" "/graphql" nil :payload "{\"query\":\"query ($owner:String!, $name:String!) {\\n repository(owner:$owner, name:$name) { id }\\n }\",\"variables\":{\"owner\":\"emacs-evil\",\"name\":\"evil-collection\"}}" :silent nil :username nil :auth forge :host "api.github.com" :callback nil :errorback nil :extra nil :value nil)
(ghub-graphql "query ($owner:String!, $name:String!) {\n repository(owner:$owner, name:$name) { id }\n }" ((owner . "emacs-evil") (name . "evil-collection")) :username nil :auth forge :host "api.github.com")
(ghub--repository-id "emacs-evil" "evil-collection" :username nil :auth forge :host "api.github.com")
(ghub-repository-id "emacs-evil" "evil-collection" :host "api.github.com" :auth forge :forge ghub)
(#f(compiled-function (class host owner name &optional stub) "Return (OUR-ID . THEIR-ID) of the specified repository.\nIf optional STUB is non-nil, then the IDs are not guaranteed to\nbe unique. Otherwise this method has to make an API request to\nretrieve THEIR-ID, the repository's ID on the forge. In that\ncase OUR-ID derives from THEIR-ID and is unique across all\nforges and hosts. " #<bytecode 0x4558ac55>) forge-github-repository "github.com" "emacs-evil" "evil-collection" nil)
(apply #f(compiled-function (class host owner name &optional stub) "Return (OUR-ID . THEIR-ID) of the specified repository.\nIf optional STUB is non-nil, then the IDs are not guaranteed to\nbe unique. Otherwise this method has to make an API request to\nretrieve THEIR-ID, the repository's ID on the forge. In that\ncase OUR-ID derives from THEIR-ID and is unique across all\nforges and hosts. " #<bytecode 0x4558ac55>) forge-github-repository ("github.com" "emacs-evil" "evil-collection" nil))
(forge--repository-ids forge-github-repository "github.com" "emacs-evil" "evil-collection" nil)
(#f(compiled-function (&rest rest) "Return the repository identified by HOST, OWNER and NAME." #<bytecode 0x4558bc2d>) ("github.com" "emacs-evil" "evil-collection") "origin" create)
(apply #f(compiled-function (&rest rest) "Return the repository identified by HOST, OWNER and NAME." #<bytecode 0x4558bc2d>) ("github.com" "emacs-evil" "evil-collection") ("origin" create))
(forge-get-repository ("github.com" "emacs-evil" "evil-collection") "origin" create)
(#f(compiled-function (url &optional remote demand) "Return the repository at URL." #<bytecode 0x4558bbc1>) "https://github.com/emacs-evil/evil-collection" "origin" create)
(apply #f(compiled-function (url &optional remote demand) "Return the repository at URL." #<bytecode 0x4558bbc1>) "https://github.com/emacs-evil/evil-collection" ("origin" create))
(forge-get-repository "https://github.com/emacs-evil/evil-collection" "origin" create)
(#f(compiled-function (demand &optional remote) "Return the forge repository for the current Git repository." #<bytecode 0x4558b969>) create)
(apply #f(compiled-function (demand &optional remote) "Return the forge repository for the current Git repository." #<bytecode 0x4558b969>) create nil)
(forge-get-repository create)
(forge-pull)
(funcall-interactively forge-pull)
(call-interactively forge-pull)
(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)
forge-20181227.1804
ghub-20181227.1039
magit-20181226.1909
I'm not sure about auth-source. I am entering my username and password upon being prompted by forge.
from ghub.
Sorry for the late respnse, I just tried this again using:
- Magit 20190102.107, Git 2.17.1, Emacs 27.0.50, gnu/linux
- Forge 20190102.58
- Ghub 20190102.109
I never had a token before and things fail after an attempted token creation with:
ghub--token: Wrong type argument: listp, "/authorizations"
I get this message after entering my github username, password, and two-factor authentication. In case it matters, I am also using a .authinfo.gpg
file.
from ghub.
That's not the same issue I would think. I also don't see how this could happen. The code paths taken by this literal string are pretty trivial at least within ghub
and I don't see anything along the way that could possibly fail.
If you want me to look into this more you will have to open a new issue and provide a backtrace.
from ghub.
@tarsius Don't want to comingle the two threads too much but I think that happens when the token already exists on github.
I hit that issue @cbourjau hit every time if there's a token.
from ghub.
Related Issues (20)
- Prompted for 2FA code, yet get error "Must specify two-factor authentication OTP code" HOT 10
- cannot obtain token while 2FA is enabled in Github HOT 1
- Problems using manual token HOT 1
- [FEATURE REQUEST] kanban boards into emacs? HOT 1
- Importance of username case for API authinfo retrieval HOT 5
- The token wizard will break in November HOT 11
- Search for ghub credentials is for the wrong user HOT 1
- cannot use `ghub-continue` to retrieve multiple pages HOT 1
- Documentation typo in section "2.2.4 Setting your Username for Other Hosts and/or Forges"
- error in process filter: BUG: missing headers HOT 4
- Always asking for username and token when using authinfo.gpg with 2-way authentication HOT 33
- 28.0.50: (wrong-type-argument stringp nil) when trying to set github.user HOT 1
- Dead link to Gitlab Tokens in documentation HOT 1
- Unable to use regenerated GitHub token HOT 3
- Unable to download issues from Gitlab HOT 2
- No longer builds with `package-build` from master HOT 2
- Does treepy go up to 0.1.2? HOT 2
- ghub--token: Required Github token does not exist HOT 2
- Error in ghub-get HOT 5
- "BUG: Missing Headers" Error Not Triggering Callbacks in Asynchronous Requests HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghub.