Reputation:
I tried reading several solves regarding ssh server key but couldn't grab the idea. This is my first push to git repository so I will ask to keep the solution as simple as possible.
First I tried git push directly from Android Studio VCS. But having 2-factor authentication enabled it didn't work and showed error like authentication failed.
Then I generated Personal Access Token and add origin like this-
git remote -v
git remote remove origin
git remote add origin [email protected]:user/repo.git
Now while trying to git push, it tried to connect with SSH server key but failed.
Upvotes: 1
Views: 4468
Reputation: 1300
Had the same issue when pushing from Android Studio with two-factor-verification enabled. As stated here I generated a personal access token. This is described in more detail here. In essence you need to:
Upvotes: 5