vermiculus / magithub

**DEPRECATED - please use Forge instead!** -- Magit-based interfaces to GitHub
GNU General Public License v3.0
579 stars 62 forks source link

Magithub is set up correctly with .authinfo.gpg but magit-checkout-pull-request prompts for a new token #355

Closed fnune closed 5 years ago

fnune commented 5 years ago

Magithub is set up correctly with .authinfo.gpg but M-x magit-checkout-pull-request prompts for a new token.

Such a Github API token is not available:                                                                                                                                                                            

  Host:    api.github.com                                                                                                                                                                                            
  User:    brainlessdeveloper                                                                                                                                                                                        
  Package: magit                                                                                                                                                                                                     

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

If in doubt, then abort and first view the section of the Ghub                                                                                                                                                       
documentation called "Manually 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? (y or n) 

All other functionality works perfectly, including creating pull requests, etc. I have set up 2FA and I've configured auth-sources to only ~/.authinfo.gpg. What could be wrong?

Thanks for the awesome software!!!

vermiculus commented 5 years ago

This token is being requested by package magit (cc @tarsius), not magithub, so you do in fact need to create that token. Magithub's token requires more permissions from you than Magit does, so ghub runs with that example and wants to keep the two scopes separate to help keep your data secure.

This should only be a one-time thing (unless of course you revoke the generated token later on).

fnune commented 5 years ago

Great, thanks a lot!