$ git config credential.helper store
$ git push https://github.com/repo.git(你的git仓库地址)

Username for 'https://github.com': <USERNAME>
Password for 'https://USERNAME@github.com': <PASSWORD>

如果是在其他电脑上使用,还可以使用缓存期进行设置到期时间

git config --global credential.helper 'cache --timeout 7200'

单位是秒,7200秒(2个小时)后失效

相关文章:

  • 2021-08-16
  • 2022-01-09
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2022-01-21
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
相关资源
相似解决方案