Git - ILLYAKO/mywiki GitHub Wiki
Personal Access Token
Source: Git Personal Access Token
Problem: I have created a new project and tried to push it to GitHub. Git requested a username and password. My regular password was rejected because GitHub changed the password strategy and asked for personal access token instead.
Solution: Creating the personal access token for the local computer
- Login GitHub account
- Click on your profile icon in the upper-right corner and choose Setting
- Go to Developer settings
- Click Personal access tokens -> Tokens (classic)
- Select a Generate new token, then click Generate new token (classic).
- Give the token name and token expiration
- Select the scope. it should be "repo"
- Click Generate token, copy token, and save for next use.
- The created token will be used instead of the password for the execution of the git command in the command line.
$ git clone https://github.com/USERNAME/REPO.git
Username: YOUR_USERNAME
Password: YOUR_TOKEN