简体   繁体   中英

GitHub new token system

Recently i received an email from GitHub saying that I have used my user and password to push data for a remote repository

来自 GitHub 的电子邮件

And this will be deprecated soon. I already get the access token for my GitHub account, but where do i store it? I'll need to type it every time that I use git push ?

Btw, i have the ~/.gitconfig file, but it's not working (every time that i push data for a remote repository i need to insert my credentials again)

You need to:

  • create a PAT (Personal Access Token)
  • use that PAT as your password (instead of your current GitHub account password)
  • setup a Git credential helper ( git config credential.helper ) in order to cache those credentials (GitHub username + token), and to not have to enter them on every Git remote operation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM