How to use Personal access token to push code to github via command line ?

0
1108

PesonalAccessToken Github

You are already using github and comfortably pushing code via command line, but recently you have enabled 2FA on your Github.

So now when you would like to push code to github via command line, you need to use access token to set the things as earlier.

Here is the process which I followed :

Step-1: Get access token from command line (https://help.github.com/articles/creating-an-access-token-for-command-line-use/)

Step-2 : Store this token to a safe place , this is your new password actually

Step-3 : Go to your repo , and type any git command e.g. git pull (See below), It will ask your user name and password, user name is your existing user name and pass word id the access token, and then its all set.

Sumits-MacBook-Pro:—- eSumit$ git pull

Username for ‘https://github.com’: [email protected]

Password for ‘https://[email protected]@github.com’:

Already up-to-date.

For Personal access Token : https://github.com/settings/tokens 

SHARE
Previous articleHow to calculate AWS S3’s (Simple Storage Service) Pricing?
Since last 15 years in different geographical locations, Sumit prepared hiring format for several hiring managers/teams to hire the balanced talents and interviewed talents on the various stages of their selection process. He also interviewed by hundreds of companies in different geographical locations.His best conclusion for hiring teams and candidate is to prepare in advance. Here ‘advance’ means keep your interview book ready and continue to update it even you are not going to interview candidates or applying for any job in next six months.