Android Studio, Github login problem incorrect credentials

試著忘記壹切 提交于 2020-12-01 07:17:41

问题


I've started working with Android Studio and I found a problem when trying to connect to Github. I've tried restarting Android Studio and even creating a new project, but I am not able to login.

I installed Git and it´s working in the local repository.

The problems are:

Incorrect credentials
Request response: 401 unauthorized

Android Studio Screenshot


回答1:


You can use the Project from Version Control, it has git.

What I did was I logged in through a token, it also tells you what needs to be added to the token and that worked for me.

You can create the token here: https://github.com/settings/tokens




回答2:


Updating to AndroidStudio 4.1.1 allowed me to access with my credentials without having to generate a token.




回答3:


you can install git in your operation system and use command for add your android project to github repository.

1- you should install git bash

2- open git bash in your project directory and initial it as a git repository

  • git init -b main

3- add your project to the local repository

  • git add .

4- commit your file to the local git repository

  • git commit -m "First commit"

5- Create a branch, usually called a 'main' or 'master'

  • git branch -M main

6- define remote git url

  • git remote add origin remote repository URL

7- finally, you should push all your project into remote git repository

  • git push -u origin main



回答4:


I got the issue solved by generating a token from https://github.com/settings/tokens and using it to add account option on Android Studio>File>settings>GitHub



来源:https://stackoverflow.com/questions/64829341/android-studio-github-login-problem-incorrect-credentials

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