Reputation:
I tried to push my project from android studio to GitHub but it failed. Here is the error:
Can't finish GitHub sharing process
Successfully created project 'BurgerRating' on GitHub, but initial commit failed:
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
unable to auto-detect email address (got 'valk@DESKTOP-59LAKG3.(none)')
I don't know how to directly put a project on GitHub because it says that the project is more than 100 files. If I do it step by step, I miss some files. Please help!
Upvotes: 2
Views: 2848
Reputation: 225
Just encountered this trying to "Share to Github" a new project on a fresh install. But once I did a Commit & Push from the normal commit menu, Android Studio opened a message box prompting for my name and email. The github integration worked fine after that.
Upvotes: 0
Reputation: 468
For me, the following worked. Please note that I'm using Windows10 and two factors verification.
Get Personal access token of github by:
Settings -> Developer settings -> Personal access tokens
Save the token in .gitconfig by:
git config --global user.name "your username"
git config --global user.password "your github access token"
Please note that this will change the global setting that is stored in:
C:\Users\{your windows user name}\.gitconfig
You might be better to save the backup of this file.
Settings
-> Version Control
-> Git
and set the git executable path.Settings
-> Version Control
-> GitHub
and click on +
or press on Alt+Insert
then choose Login with token
and paste the Github token that we generated in step 1.VCS
-> Import into version control
-> Share project on Github
and share the project.VCS
-> Remotes
and delete the origin.origin
with the URL https://github.com/{your github user name}/{repository name}.git
which is usually used for cloning the repository.VCS
-> Git
-> Push
Upvotes: 0
Reputation: 539
The error you are showing is simply telling that you are not identified on your git. It suggested you resolve by the
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
you can just follow that instruction first and show what happens next
Upvotes: 2