Can't log in to GitHub on Android Studio

北战南征 提交于 2020-12-24 23:04:02

问题


I can't sign in to GitHub on Android studio, as the picture shows.

I have reset my password, tried to put ' https:// ' in the server box, and still doesn't let me in and shows the same message.

I can no longer update the project I am working on with my team.
For some reason I was still able to commit and push to the repo and the changes were visible online.


回答1:


Try this:

  • Log into gitHub, click your avatar in the top righthand corner,
  • Choose settings -> Developer settings -> Personal Access Tokens
  • Click the button to Generate New Token
  • Add a note if you want, like "Android Studio"
  • Select repo(all), read:org (under admin:org), gist
  • Click Generate Token button
  • Copy the token
  • In Android Studio, File, Settings, Version Control, Github, add an account
  • Click the Use Token hyperlink like in your screenshot
  • Paste your token, click login, click ok




回答2:


Check if you have activated 2FA on your account.

If you have (two-factor authentication), then the password you should enter would actually be a PAT (Personal Access Token), in your settings, not your GitHub account password.




回答3:


When I login with username and password, I got this error: 401 Unauthorized (password is true)

Then I created a token like @tannergr, this time I got Insufficient security scopes error.

After that, I added all privileges to the token. Everything was looking normal. I tried to clone repo from url, unfortunately I got Clone failed: Unable to create destination directory error.

I am using Android Studio version 4.1.1 on my new computer. Android Studio makes me sad with new bugs in every version.

We are not alone there are another question Android Studio, Github login problem incorrect credentials



来源:https://stackoverflow.com/questions/64869735/cant-log-in-to-github-on-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!