Reputation: 35
I am trying to upload a project form Android Studio on GitHub, but for some reason I can't log in...I am sure my credentials are correct, I even changed my password, and tried both my username and my email as Login. What could be the problem here?
Upvotes: 1
Views: 1765
Reputation: 730
I have a feeling I know what is happening, you're entering your standard email/password combo, but the IDE is expecting you to give a token, rather than your personal password. Therefore, let's grab a token!
First, navigate to GitHub and create a personal access token, a guide on how to do that can be found here.
Once generated with all the necessary scopes, copy the token to your clipboard.
From here, you have two options, either:
Open Android Studio and click file -> settings
then, under the drop down of version control
, go to GitHub
. Click the little +
icon over in the top right and then a little login panel will appear.
Click Use Token
found within this panel, then paste your token.
Or
Open the command line and go to the root directory of your project and type your command that you wish to execute e.g. git clone www.myrepo.com
, so that you're prompted for your username and password, enter your email and then paste your token when asked for your password.
Done!
If you're not being prompted for your credentials, you will probably need to go into Credential Manager
in Windows or Key Chain
in iOS and remove any stored GitHub credentials that are no longer required, as Windows/iOS is using those saved details as default.
Additional tip
When creating your token you might want to revoke any stored personal access tokens in GitHub
, that might have been generated by third-party plugins that you no longer need/require access.
Upvotes: 4