git跳过用户名和密码验证

$ 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个小时)后失效

posted @ 2020-05-11 10:51  青柚  阅读(1069)  评论(0编辑  收藏  举报