Skip to content

Unable to authorize GitHub password (Unathorized/Not Found) #2655

Open

Description

@flyingduck92

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

Activity

  1. amichaelc commented on Nov 29, 2020

    @amichaelc

    I had the same issue. I went to the github tokens link provided and made a token, and now it works.

  2. mislav commented on Nov 30, 2020

    @mislav
    Owner

    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 repo scope) at https://github.com/settings/tokens and paste it instead of the password.

  3. pinned this issue on Nov 30, 2020
  4. flyingduck92 commented on Dec 1, 2020

    @flyingduck92
    Author

    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 repo scope) and paste it instead of the password.

    Oh okay, I will try usng Personal Access Token then.
    Cheers sir

  5. dominguespt commented on Dec 8, 2020

    @dominguespt

    Hello, I uninstalled hub gem and did the update wit Homebrew

  6. changed the title [-]hub failed to gives access after inserting username and password[/-] [+]Unable to authorize with my GitHub password (Unathorized/Not Found)[/+] on Dec 15, 2020
  7. JavaProScript commented on Dec 19, 2020

    @JavaProScript

    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 repo scope) at https://github.com/settings/tokens and paste it instead of the password.

    This didn't fix it for me. Error stays the same. I will try to find a fix.

  8. ketankshukla commented on Jan 15, 2021

    @ketankshukla

    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 repo scope) at https://github.com/settings/tokens and paste it instead of the password.

    You have NO idea how much I searched the internet to find this solution! THANK YOU!

  9. carlosloureda commented on Jan 16, 2021

    @carlosloureda

    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 repo scope) at https://github.com/settings/tokens and paste it instead of the password.

    Thanks @mislav. That worked for me!

  10. alk-gmathews commented on Feb 4, 2021

    @alk-gmathews

    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 repo scope) at https://github.com/settings/tokens and paste it instead of the password.

    This information should be in the readme, and not in an issue.

  11. leo60228 commented on Feb 8, 2021

    @leo60228

    Why was this issue closed? This seems like a pretty major issue.

  12. mislav commented on Feb 19, 2021

    @mislav
    Owner

    True— it's not solved yet, so I'm reopening.

  13. reopened this on Feb 19, 2021
  14. 29 remaining items

  15. gambas-maker commented on Jan 18, 2022

    @gambas-maker

    Hello, I'ma facing this issue, I removed ~/.config/hub then I did hub create
    But now I'm having this error :
    Error creating repository: Not Found (HTTP 404)

    Do you have an idea ?

  16. Betristor commented on Mar 3, 2022

    @Betristor

    They really not?

    image

  17. timmattison commented on Mar 18, 2022

    @timmattison

    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.

    Not found could be replaced with:

    Not found. Are you trying to use a username and password?
    
    Until we fix this in hub, the solution is to generate a Personal Access Token (with at least repo scope) at https://github.com/settings/tokens and paste it instead of the password.
    

    And when it says this:

    Error fetching pull requests: Unauthorized (HTTP 401)
    Bad credentials
    

    It would be better to say:

    Error fetching pull requests: Unauthorized (HTTP 401)
    Bad credentials
    
    Try clearing out your ~/.config/hub file. Your next attempt to connect with request that you reauthorize.
    
  18. added a commit that references this issue on Mar 25, 2022
  19. added a commit that references this issue on May 3, 2022
  20. aamruth commented on Aug 5, 2022

    @aamruth

    git:(master) hub create
    github.com username: blabla
    github.com password for blabla (never stored):
    Error creating repository: Not Found (HTTP 404)

    Tired using the token too, still got the same error

  21. added a commit that references this issue on Oct 7, 2022
  22. NdagiStanley commented on Oct 11, 2022

    @NdagiStanley

    Using the PAT (Personal Access Token) with repo scope as the password works for me.

  23. TimCookXXX commented on Nov 15, 2022

    @TimCookXXX

    Извините за неудобства. GitHub устарел от своего API авторизации, на который хаб полагался при обмене пароля на токен.

    Пока мы не исправим это в хабе, решение состоит в том, чтобы сгенерировать токен личного доступа (по крайней мере, с repoобластью действия) на https://github.com/settings/tokens и вставить его вместо пароля.

    It works, thanks!
    But if you didn't select 'Repo' when creating the key, then you get the following error:
    Error creating repository: Unauthorized (HTTP 401) Bad credentials
    You need to delete the ~/.config/hub directory and re-authorize on github.com and everything should work fine.
    rm -rf ~/.config/hub
    And after that, authorize again by entering your login and the key that you previously created:
    hub create

  24. Klairm commented on May 7, 2023

    @Klairm

    Using the PAT (Personal Access Token) with repo scope as the password works for me.

    I'm trying to use a token for password but it doesn't work for me

  25. nh2 commented on Nov 5, 2023

    @nh2

    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.

    Same here.

    @mislav Could you please make the tool emit an error, instead prompting for username and password and saying Not Found, when it's known that this cannot currently work?

  26. added a commit that references this issue on Nov 5, 2023
  27. changed the title [-]Unable to authorize with my GitHub password (Unathorized/Not Found)[/-] [+]Unable to authorize GitHub password (Unathorized/Not Found)[/+] on Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions