GitHub从2021.08.13开始使用Token代替账号和密码

  GitHub从2021.08.13开始不再支持使用账号、密码的方式推送和拉取代码了,使用Token代替

  一、怎样获取Token

https://docs.github.com/cn/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

  二、怎样将Token保存在客户端

#默认缓存15分钟
git config --global credential.helper cache
#自定义缓存一个小时
git config --global credential.helper 'cache --timeout=3600'
#长期缓存
git config –global credential.helper store

 

posted @ 2021-12-05 22:41  雷雨客  阅读(172)  评论(0编辑  收藏  举报