Unable to login with GH CLI #23452
-
|
I’ve been trying to login to the GH CLI and am running into trouble. I’ve been getting this same error message each time I try to login: So far I’ve tried removing the github-related dotfiles from my root directory, and I’ve uninstalled and reinstalled via brew several times. I’m running this on a late 2019 Macbook Pro. Any leads on what to try to get this working would be very appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 5 replies
-
|
What’s your output for the following command? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
That looks like an alright version of CLI. Did you make sure you’re using a Personal Access Token and not your accounts’ password? Additionally, you could try authenticating via a browser (which is the default behavior when running |
Beta Was this translation helpful? Give feedback.
-
|
That’s right—I did at first think it was my regular password, but then tried a Peronsal Access Token. Running
|
Beta Was this translation helpful? Give feedback.
-
|
I think the thing to look at is why you’re getting Node/nvm errors. The official |
Beta Was this translation helpful? Give feedback.
-
|
Ah, thank you. I deleted that file in my node bin, but when I call Do you know if there’s a place in the OS or the shell where these “routes” to files are defined? In other words, is there a place where this mistaken ‘route’ is defined that I could delete? |
Beta Was this translation helpful? Give feedback.
-
|
Your shell (Bash) seems to still have the old binary location for The list of places that are searched in general is the |
Beta Was this translation helpful? Give feedback.
-
|
airtower-luna:
Amazing, thank you so much! Unrelated to the topic at hand, but this I’m seeing the colon separated list. Each of these is a path to some place. So just to make sure I’m understanding correctly, this is a list of the search heirarchy which the OS follows to find a file called |
Beta Was this translation helpful? Give feedback.
-
|
nathanabram:
Yes, exactly. The directories in your |
Beta Was this translation helpful? Give feedback.
-
|
If this happens to you in Windows, try this on the command line: Now you might see something like: So you can change the names of those files to get them out of the way: You can also go to your PATH settings and move the path to GH up to the top of the PATH list. It's like: You will need to open a fresh Command window after you update the path if you do it from Windows settings. Then when you run "gh" it ought to be the real gh |
Beta Was this translation helpful? Give feedback.
-
|
I got this issue when i tried to install I uninstalled and used |
Beta Was this translation helpful? Give feedback.
Your shell (Bash) seems to still have the old binary location for
ghcached, usehash -d ghto make it forget.The list of places that are searched in general is the
PATH, runecho $PATHto see it (colon separated list). It’s usually set during login and possibly modified when you start the shell. For Bash check.bashrcin your home, but there may be other system-dependent locations which I don’t know for MacOS.