Settings for GitHub 2-steps Verification on Mac (without Using Terminal!)
This is a note about settings to use git push with 2-step verification GitHub account without using Terminal.
In this article, I used GitHub Desktop (as a GitHub client) and Atom (as a text editor) instead of typing on Terminal. (I guess that you can replicate those steps by other applications which is familiar with you.)
This article is for non-engineers who need to use Git reluctantly, so I write only the minimum steps.
Overview
- get GitHub Personal access tokens
- create
.netrcfile on your home directory
Get GitHub Personal Access Tokens
You should get your personal access token from [Settings] > [Developer settings] > [Personal access tokens] on github.com first.

After click [Generate new token], GitHub would request to type description and select scopes.

Click [Generate token] — the green button at the bottom of that page — , then the new token would be shown.

Create .netrc File on Your Home Directory
Next, you should create or update .netrcfile on your home directory.
Open a text editor and create new file, and save as /Users/{your_name}/.netrc. The application might warn it’s a system file, but you can agree it. Then, type following settings and save the file.
machine github.com
login {your_github_account}
password {your_github_personal_access_token}
protocol httpsAfter that, you would be able to push to your project repository by GitHub client. (In my case, I needed to restart GitHub Desktop.)
