-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manual token not being detected #57
Comments
This adds the auth-sources variable to my config to ensure that the right file is being pulled with my github token. However it appears that ghub does not pull from this file as I'm getting the wizard still even though I'm not supposed to cause I have 2FA turned on. I've opened an issue magit/ghub#57 so hopefully they'll get back to me.
Same issue here. I'm on Emacs 26 with the latest ghub |
Does the line end with a newline character? |
Also try |
Wow, interesting observation. I did have comments on the top of the file setting some file-local variables. After removing the line everything works fine. Thank you for the project, and for your prompt response. =) |
Could you please try to revert the "fix" and post the file's contents (sans secrets). (advice-add 'auth-source-netrc-parse-next-interesting :around
'auth-source-netrc-parse-next-interesting@save-match-data)
(defun auth-source-netrc-parse-next-interesting@save-match-data (fn)
"Save match-data for the benefit of caller `auth-source-netrc-parse-one'.
Without wrapping this function in `save-match-data' the caller
won't see the secret from a line that is followed by a commented
line."
(save-match-data (funcall fn))) |
This works for me:
and with the above kludge this works too
|
Same as yours but without the comment mark, i.e.:
|
With the fix reverted, ghub will continue working fine on repositories it already knows, but the problem will show up again when accessing a new repo. Adding the comment mark |
I have added a warning about this to the manual.
@juliusdelta I'm hoping that following this advice will do the trick for you too. If not, then let us know. |
@tarsius thanks for checking into this. Unfortunately it's still not working. I've removed any and all comments and ensured it ended with a newline character, (which I'm assuming just means |
Try to narrow the issue down. Try using |
I am going to assume this is a "recompile everything and restart Emacs" issue. |
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"))
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 asEmacs 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.The text was updated successfully, but these errors were encountered: