Code Monkey home page Code Monkey logo

Comments (2)

rickalex21 avatar rickalex21 commented on June 15, 2024

UPDATE: I think you have to open the browser first then let it open up a new tab then close the tab
for it to work. When you let it open up the browser on it's own I don't think it will work cause
that was the problem I was having. I did manage to get it to work after messing with it.
Not sure if this is a bug or not?

from cli.

williammartin avatar williammartin commented on June 15, 2024

Hey @rickalex21, sorry for the long delay in responding to this after Christmas. Some team changes and a large backlog.

I'm really not sure what you're running into here, after you enter the code the CLI will poll the server for the access token:
https://github.com/cli/oauth/blob/adf5f733ffd14993aad9f3ff02c757a737f7c63b/device/device_flow.go#L131-L175

If it's hanging forever something funky is going on but I'm afraid I don't have enough information here to make a guess. Was it definitely hanging forever? How long did you wait?

Regarding:

I'm on firefox, I can't try it with brave because it won't open brave despite brave being my default browser.

The CLI will try to interrogate some environment variables and config https://github.com/cli/go-gh/blob/d88d88f917cd4e0bcaa582bac2bb909bd79f9759/pkg/browser/browser.go#L69-L80

And if it can't find any of those it will ask the system to help out (here's the linux code) https://github.com/cli/browser/blob/b393df5d7bfa7490b76669e04a8652c3e167c524/browser_linux.go#L8-L21

I'm not exactly sure how those relate to your "default browser".

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.