github在https协议下使用,如何免密码登陆

作者

使用一条命令就可以解决 git config credential.helper store, 通过这条命令,就可以保存密码,再次推动的是就不用密码

具体操作的步骤

  1. 使用https协议对项目进行克隆
  2. 进入新克隆的项目执行命令
git config credential.helper store

# git config --unset credential.helper

检查 用户名和密码是否已经存储到本地磁盘

bash
cat ~/.git-credentials

如果这个文件存在,就是表示已经成功

检查 配置文件

bash
git config --get credential.helper

如果是输出是 store表示,已经开始存储密码。

了解更多

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

回复

您的电子邮箱地址不会被公开。