Repository navigation
Authentication fails since it can't access localhost in the broweer #773
Description
Activity
Thank you for reporting!
- What is your OS? (If you used
brew install, I'm assuming it's likely macOS?) - Did the terminal where you ran
gh pr createshow any error messages or warnings around the time that Firefox tried to connect to the localhost server? - Are you using Docker or
sshanywhere where you rungh?
You can retry the operation by enabling verbose mode
DEBUG=oauth gh pr createwhich will print additional information during authentication. I don't know if this will help, but it's worth a try! See if there is anything that sticks out to you pleaseReacted by David Adam- What is your OS? (If you used
- addedmore-info-neededMore info needed from user/contributorMore info needed from user/contributor
on Apr 10, 2020 I'm on ubuntu and running into the same issue, all my development is done on a headless system and on my thin client where I have a browser I'm unable to install any software. And hence apparently unable to get started with the app. I guess I'll have to figure out if I can pipe in a manual access token and reverse the config format.
It's a really miserably bad experience 😢
Reacted by Thomas MeckelApparently one can manually create a config file
~/.config/gh/config.yml
and fill in a personal access token:$ cat ~/.config/gh/config.yml github.com: - user: ${github username} oauth_token: ${personal access token from https://github.com/settings/tokens}Hope others find this useful
Reacted by Jack Lindamood, Richard Cheney, richard, Erik Nelson, Stefan Radziuk, Ohad Mizrachi, Ross Poulton, Lars Jonsson, Jeff Geerling, psY1neWaV and 2 more- I tried it now and it just worked. Very strange.…On Tue, Apr 14, 2020 at 8:32 PM Mislav Marohnić ***@***.***> wrote: @jamo <https://github.com/jamo> I'm sorry for the bad experience, and thank you for sharing our workaround. We plan to make it easier to paste in your generated token without having to manually edit any configuration file. #297 <#297> — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#773 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHRR4P2W5QYPQLCAR42ELLRMSM2HANCNFSM4MFKHJUQ> .
I have the same issue on my old Ubuntu (14.04) with gh 0.9.0.
DEBUG=oauth gh issue list Notice: authentication required Press Enter to open github.com in your browser... * Request at 2020-05-29 09:16:40.953632132 +0200 CEST m=+0.016907878 * Request to https://api.github.com/repos/cli/cli/releases/latest * Request took 322.240487ms open https://github.com/login/oauth/authorize?client_id=******&redirect_uri=http%3A%2F%2F127.0.0.1%3A48475%2Fcallback&scope=repo+read%3Aorg+gist&state=************* Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank" [15804:15824:0529/091647.252711:ERROR:browser_process_sub_thread.cc(217)] Waited 3 ms for network serviceand yes I have some docker stuff.
p.s. I think the work around should be in documentation if it's works, for headless machines at least.
docker0 Link encap:Ethernet HWaddr 56:84:7a:fe:97:99 inet addr:172.17.42.1 Bcast:0.0.0.0 Mask:255.255.0.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)@mislav is this still something you think warrants investigation or is it ok to close?
I just checked it and the flow worked good, cli to browser and back. Version 0.9.0
Describe the bug
I did brew install successfully.
Run
gh pr create. It displayed:The browser is opened with:
(masked values)
but it can't access it:
Version: 0.6.4