-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to authorize GitHub password (Unathorized/Not Found) #2655
Comments
I had the same issue. I went to the github tokens link provided and made a token, and now it works. |
I'm sorry for the inconvenience. GitHub deprecated its Authorizations API, which hub relied on for exchanging a password for a token. Until we fix this in hub, the solution is to generate a Personal Access Token (with at least |
Oh okay, I will try usng Personal Access Token then. |
Hello, I uninstalled hub gem and did the update wit Homebrew |
This didn't fix it for me. Error stays the same. I will try to find a fix. |
You have NO idea how much I searched the internet to find this solution! THANK YOU! |
Thanks @mislav. That worked for me! |
This information should be in the readme, and not in an issue. |
Why was this issue closed? This seems like a pretty major issue. |
True— it's not solved yet, so I'm reopening. |
@mislav Can we change the intimation message until this is fixed? Something like |
Recently, I performed a cherry pick for the first time. When I ran ./hack/cherry_pick_pull.sh after setting up all the env variables, I was asked for my github password. When I gave my actual github password it threw a 404 not found which confused me. I then came across this mislav/hub#2655 (comment) . I created a github token post which I was able to cherry pick successfully. The hub project team is looking to fix it but until then I feel that we should document it. Do let me know if I did something wrong here in the cherry pick process.
Is there a way to change the message, just like @bharath-123 said ?
I was hoping that we could save the token somewhere too, is that possible ? Edit: Found this on Hub Configurations
|
Repo successful created with the token, but when i try to |
if your trying to push with git could most likely be a setting there. Do you have it set up for https or ssh? |
Since it doesn't seem to have been posted here, GitHub added an OAuth flow that doesn't need a web browser/server: https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow |
I just always do SSH as I know how to get it working, however I ended up here as I completely forgot about the token thing, they really need to update the word password to token really. |
Why did Git do something that would break a common workflow without first providing a fix for that workflow? Sounds a lot like something Microsoft would do... |
I'm using https |
It works !!! Thank you so much ❤️ |
I am facing a similar issue, in past whenever i did git push origin master on the new repo using git bash, it prompted me with a username and password screen, where in pwd i used to enter PAT, and things would just work fine. But this time gitbash is not prompting me with username and password. |
i has to change url to https inside .git/config in order to get it up and running |
Access Token stops working... |
I was able to get this working by generating a PAT per the linked docs, and then setting up a
|
I am trying to push a file in Github. I was able to pass in my username, but unable to put my token password. I did not see the little window that asks for my password I just see a little key picture. I will appreciate if someone can help me with that. |
I tried this but I am getting the following error
I tried reinstalling the gem to no avail, any suggestions? |
@pcobos You seem to be using the hub Ruby gem, which last had a release in 2014 and was since rewritten in Go and released through this project's Releases page. You should upgrade! |
Use gh instead of hub, https://github.com/cli/cli > brew install gh
> gh auth login
> gh repo create |
Hello, I'ma facing this issue, I removed ~/.config/hub then I did Do you have an idea ? |
Please, please, please get rid of this tool if it is no longer supported. I just wasted 30 minutes trying to get a previously working setup up and running and ended up here at the bottom of this rabbit hole. It is fine if the tool needs a token, it is fine if the tool is discontinued, but do your best to surface this to users running the latest version as fast as possible. If the tool is to continue to be available my suggestions are below.
And when it says this:
It would be better to say:
|
According to [this comment][ref], the usage of a password is currently broken but it is possible to pass an access token instead. This access token is then stored in the configuration file, so adjust the message to ask for an access token, tell the user where then can generate a new one, provide the required scope, and do not tell that the value is not stored. [ref]: mislav#2655 (comment)
GitHub CLI is an official project whereas `hub` isn't (did it used to be?), GitHub CLI seems more fully featured and a drop in replacement for usage in `clone`, just using GitHub CLI replaces 2 dependencies with just 1, and GitHub CLI worked out of the box on a new machine, whereas `hub` was giving an obtuse error that I couldn't easily resolve (see mislav/hub#2655).
git:(master) hub create Tired using the token too, still got the same error |
I couldn't get hub to authenticate properly, because it hasn't been updated to support github's new auth APIs. Most people recommended switching to gh: mislav/hub#2655
Using the PAT (Personal Access Token) with |
It works, thanks! |
I'm trying to use a token for password but it doesn't work for me |
The current RELEASE.md relies on the `hub` command. I ran into authorization issues while trying to use `hub` for the release that were not easy to resolve. The problems I encountered are captured in a still open `hub` issue: mislav/hub#2655. Given the extra steps required to work around and resolve this issue, I think it would be simpler to frame the release instructions in terms of local `git` commands and Github UI. This change updates the RELEASE.md to replace `hub` commands with local `git` commands and Github UI instructions.
The current RELEASE.md relies on the `hub` command. I ran into authorization issues while trying to use `hub` for the release that were not easy to resolve. The problems I encountered are captured in a still open `hub` issue: mislav/hub#2655. Given the extra steps required to work around and resolve this issue, I think it would be simpler to frame the release instructions in terms of local `git` commands and Github UI. This change updates the RELEASE.md to replace `hub` commands with local `git` commands and Github UI instructions.
Same here. @mislav Could you please make the tool emit an error, instead prompting for username and password and saying |
I already put an alias for hub on my
.bashrc
alias git=hub
But when I want to create a repos my credentials always failed
Command attempted:
git create jam_hub
github.com username: flyingduck92
github.com password for flyingduck92 (never stored):
What happened:
Error creating repository: Unauthorized (HTTP 401)
Bad credentials. The API can't be accessed using username/password authentication. Please create a personal access token to access this endpoint: http://github.com/settings/tokens
More info:
git version 2.29.1.windows.1
hub version 2.14.2
The text was updated successfully, but these errors were encountered: