DEV Community

Cover image for Add Personal-Access-Token to repo easily.
Dr. Zola
Dr. Zola

Posted on

Add Personal-Access-Token to repo easily.

github stopped their support for the password authentication. Now personal-access-token is on the plate, there is an easy way to add the personal-access-token to your repository. with a simple command.

  1. First cd into your repo
  2. add the below command

git remote set-url origin https://USERNAME:PERSONAL-ACCESS-TOKEN@github.com/USERNAME/REPO.git

Here, the USERNAME is your git username, PERSONAL-ACCESS-TOKEN is your personal-access-token generated in your account and the REPO is the repository name.

This will bind the personal-access-token to the repo and will never ask for username and password for that particular repo.

Top comments (0)