defunkt / gist.el

Yet another Emacs paste mode, this one for Gist.
550 stars 90 forks source link

Prompts for username and password despite them being in git config #75

Closed alphapapa closed 8 years ago

alphapapa commented 8 years ago
➤ git config --global github.user
alphapapa

➤ git config --global github.token
[redacted]

Then, in Emacs, I mark a region and call gist-region, but then I get prompted for a username and token in the minibuffer:

Username [for https://api.github.com/gists]:

I tried restarting Emacs, didn't help. Also, in Emacs:

(gh-config "user")
"alphapapa"
(gh-config "token")
"[redacted]"

So I don't know what is going on. :(

Using:

gist-20150906.954
gh-20150906.848

Thanks.

alphapapa commented 8 years ago

Okay, the issue was that gh-auth was looking for oauth-token not token. The blog post referenced in the readme says to use token not oauth-token. I guess this should be mentioned in the readme. :)

j0ni commented 8 years ago

I'm seeing the same issue.

I read @alphapapa's solution to be setting github.oauth-token rather than github.token - I tried that, it didn't fix things for me.

alphapapa commented 8 years ago

Seems to be working for me now. I'm going to guess that it's been fixed and close this. @j0ni if you still have this problem, feel free to reopen.