Android Studio can't login to GitHub

Android StudioAuthenticationGithub

Android Studio Problem Overview


I'm getting this issue while logging in on GitHub on Android Studio: >Can't login: Can't get user info 404: Not found

Has someone faced this issue? How can I get around this?

Android Studio Solutions


Solution 1 - Android Studio

I have faced this problem too. Try using token to login.

Log in to github.com on the browser. Go to Settings -> Developer settings -> Personal access tokens. There you can create a new token and then, go back to Android Studio, select Enter Token at the login prompt.

Solution 2 - Android Studio

I'm working on 4.1.1 Android Studio and it didn't allow me to log in with Login + Password neither.

So I succeeded generating a token from Github (Account -> Settings -> Personal access tokens - > Generate new token), but make sure before generating the token to check the "repo", "gist" and "read:org" options.

Everything's working fine from there.

Have fun coding !

Solution 3 - Android Studio

I use "github.com" as host (not the whole clone url), and my github login and password and can login without any issues.

Solution 4 - Android Studio

In host you only have to put 'http://github.com';

Nothing more

Solution 5 - Android Studio

you can use Token for login in android studio .

enter image description here

1.go to your github profile

2.click on settings

3.go to Developer settings

4.click on Personal access tokens

5.Generate new token

and copy it and paste it in above window on android studio.

Solution 6 - Android Studio

For me the problem was that the repository URL was set with http:// but the credential goes to the same URL but with https://. changing the repository URL to https:// solved my problem.

Solution 7 - Android Studio

So, I know it's been 6 years now, but since I didn't find the solution that worked for me, I decided to share here.

Only step: Go to Settings > Version Control > Git > Mark "Use credential Helper" box and you're done.

Hope this helps someone, thanks.

Solution 8 - Android Studio

1- Go to your github page,

2- Open Settings menu and create a new token

3- Copy new token

4- Open Androdi studio goto VCS -> import into version control -> Share Project in Git Hub login

5- Use Token option

6- Paste token you created and copied

7- Click login

No need to change url

I am using Android Studio 4.1

Solution 9 - Android Studio

If you can't find the access token option in Android Studio

I was simply not able to find the option to add the access token to Android Studio, as the credential was not working.

If you click on the Add Account option as shown below, you won't find the option to enter the access token (bad UI I'll say):

Add Account with no option for access token

Solution:

Click the small + icon at the bottom of the dialog box to find a menu > choose Log In with Token to find the option.

Generate a token from Github and enter it here. It will be done!
Where to find the access token option

Solution 10 - Android Studio

I faced the this issue for my private repository, So in Github I created new access token and given all access for this token. Use this token in Android studio, It worked for me

Solution 11 - Android Studio

I'm done with this problem, use the token to login. create tokens in this way; simply checklist on

-repo -admin:org -gist Ceklist Token

Solution 12 - Android Studio

You can use token to solve this problem.

Login to GitHub account in browser Go to SETTINGS-> DEVELOPER SETTINGS->PERSONAL ACCESS TOKENS here you can create token with suitable scopes. Remember that selecting scopes is important to access token in android studio. After that just copy the generated token and paste in android studio.

Have a fun with coding!

Solution 13 - Android Studio

I have face this same issue with both Mac and Windows. Creating a personal access token always solved this issue for me. Sign into github click on on account > setting> Developers Settings > Personal Access Tokens

Solution 14 - Android Studio

Using '<https://github.com/>'; and my credentials, I get access

Solution 15 - Android Studio

From Android Studio.

  1. Go to Settings
  2. Go to Github
  3. Make sure you login in using a created Auth Token Key from Github

From Github.

  1. Go to Preferences
  2. Go to Developer Mode
  3. Generate a New Token Key and give it all the rights to access Github account
  4. Copy new Generated key into Android Access token and enter OK when done.

Solution 16 - Android Studio

From Android Studio.

Go to Settings Go to Github Make sure you login in using a created Auth Token Key from Github

From Github website

Go to Settings Go to Developer Settings Generate a New Token Key Give a alias to the Token key Mark repo, admin:org, gist. Click on Generate token button Copy new Generated key into Android Access token and enter OK when done.

Solution 17 - Android Studio

Follow the steps ---

  1. Go to file >> setting >> version control >> add account
  2. then login.
  3. If can't login message is displaying then you have to generate the token.
    Go to Settings >> Developer settings >> Personal access tokens.(make sure to check fields like select all repo, select read:org(inside- admin:org), select gist).
  4. When you paste git url use .git at the end of url.

Solution 18 - Android Studio

  1. Use SSH (forget https) (E.g., don't use https url for cloning)
  2. Use Personal Access Token (PAT) (forget username/password)

> (e.g., Settings > Developer Settings > Personal Access Token)

  1. Update git to latest version (e.g., 2.35.1) //I think this is important
  2. In Github, Uncheck Settings > Developer Settings > Keep my email addresses private

Conclusion: You add Personal Access token in Github. Then from any IDE (e.g., Android Studio, IntelliJ IDEA etc.) you can add remote using ssh (e.g., name: origin, URL: [email protected]:your_github_username/your_git_repo.git. That's it

If not already done,

  1. Configure git global username and email

    > git config --global user.name "your_username" && git config --global user.email "your_email"

If in windows, you can add windows credentials for your user, control panel > users > manage your credential > Windows Credentials > Add a generic credential >

> Internet address will be git:https://github.com and you need to type > in your username and password will be your GitHub Personal Access > Token => Click Ok and you are done

Solution 19 - Android Studio

Generating the Token as explained worked for my perfect. Need to grant the correct permissions to such token.

Solution 20 - Android Studio

  1. server => github.com to change http://github.com
  2. use access token no password

Solution 21 - Android Studio

I deleted all tokens and generated new one with all access, Now it's working...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRafaelView Question on Stackoverflow
Solution 1 - Android StudioTysonSubbaView Answer on Stackoverflow
Solution 2 - Android StudioFlorian-MartinView Answer on Stackoverflow
Solution 3 - Android StudioKaiView Answer on Stackoverflow
Solution 4 - Android StudioShudyView Answer on Stackoverflow
Solution 5 - Android StudioSana EbadiView Answer on Stackoverflow
Solution 6 - Android StudioAhmad Reza EnshaeeView Answer on Stackoverflow
Solution 7 - Android StudioJulio Cesar ReisView Answer on Stackoverflow
Solution 8 - Android Studiouser3342978View Answer on Stackoverflow
Solution 9 - Android StudioHasanView Answer on Stackoverflow
Solution 10 - Android Studiou_pendraView Answer on Stackoverflow
Solution 11 - Android StudioAlan KurniadiView Answer on Stackoverflow
Solution 12 - Android StudiopradyumnaView Answer on Stackoverflow
Solution 13 - Android StudioKevinSom98View Answer on Stackoverflow
Solution 14 - Android StudioJordi M.View Answer on Stackoverflow
Solution 15 - Android StudioOlvin BolanosView Answer on Stackoverflow
Solution 16 - Android StudioDesilio do Carmo Lima NetoView Answer on Stackoverflow
Solution 17 - Android StudioRishabhSHARMAView Answer on Stackoverflow
Solution 18 - Android StudioUddhav P. GautamView Answer on Stackoverflow
Solution 19 - Android StudioCNKView Answer on Stackoverflow
Solution 20 - Android StudioAK IJView Answer on Stackoverflow
Solution 21 - Android StudioVishva VijayView Answer on Stackoverflow