Android Studio can't login to GitHub
Android StudioAuthenticationGithubAndroid 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 .
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.
- Go to Settings
- Go to Github
- Make sure you login in using a created Auth Token Key from Github
From Github.
- Go to Preferences
- Go to Developer Mode
- Generate a New Token Key and give it all the rights to access Github account
- 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 ---
- Go to file >> setting >> version control >> add account
- then login.
- 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, selectread:org
(inside-admin:org
), select gist). - When you paste git url use
.git
at the end of url.
Solution 18 - Android Studio
- Use SSH (forget https) (E.g., don't use https url for cloning)
- Use Personal Access Token (PAT) (forget username/password)
> (e.g., Settings > Developer Settings > Personal Access Token)
- Update git to latest version (e.g., 2.35.1) //I think this is important
- 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,
-
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
- server =>
github.com
to changehttp://github.com
- use access token no password
Solution 21 - Android Studio
I deleted all tokens and generated new one with all access, Now it's working...