Skip to content

Instantly share code, notes, and snippets.

@khattab88
Created August 15, 2021 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khattab88/7b464668b8e8e7be6ff863efd3380a3a to your computer and use it in GitHub Desktop.
Save khattab88/7b464668b8e8e7be6ff863efd3380a3a to your computer and use it in GitHub Desktop.
https://stackoverflow.com/questions/68775869/support-for-password-authentication-was-removed-please-use-a-personal-access-to
Create Personal Access Token on Github
From your Github account, go to Settings => Developer Settings => Personal Access Token => Generate New Token (Give your password) => Fillup the form => click Generate token => Copy the generated Token, it will be something like ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta
Now follow below method based on your machine:
For Windows OS
Go to Credential Manager from Control Panel => Windows Credentials => find git:https://github.com => Edit => On Password replace with with your Github Personal Access Taken => You are Done
For MAC OS
Click on the Spotlight icon (magnifying glass) on the right side of the menu bar. Type Keychain access then press the Enter key to launch the app => In Keychain Access, search for github.com => Find the internet password entry for github.com => Edit or delete the entry accordingly => You are done
For Linux based OS
For Linux, You need to configure the local GIT client with a username and email address,
$ git config --global user.name ""
$ git config --global user.email ""
$ git config -l
Once GIT is configured, we can begin using it to access GitHub, In a examle :
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
> Cloning into `Spoon-Knife`...
$ Userame for 'https://github.com' : username
$ Password for 'https://github.com' : give your personal access token here
Now cache the given record in your computer to remembers the token :
$ git config --global credential.helper cache
If needed, anytime you can delete the cache record by :
git config --global --unset credential.helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment