mac下git push避免每次都输入用户名和密码的配置

2023-05-25,,

参考链接:http://www.linuxdiyf.com/linux/18389.html

链接2:https://git-scm.com/book/zh/v2/Git-%E5%B7%A5%E5%85%B7-%E5%87%AD%E8%AF%81%E5%AD%98%E5%82%A8#_credential_caching

我选择的是明文存放在磁盘中,不过期的

1.创建并且写入.git-credentials文件,vim编辑他,写入下面一条

2.比如用户名为tom,密码为tompassword,就这样写

https://tom:tompassword@github.com

3.保存后在终端下执行  git config --global credential.helper store

这样就可以了

mac下git push避免每次都输入用户名和密码的配置的相关教程结束。

《mac下git push避免每次都输入用户名和密码的配置.doc》

下载本文的Word格式文档,以方便收藏与打印。