一、本地上传Github忽略输入密码
有两种方法。
1.第一种方法
在本地克隆下来的git仓库中找到 .git 目录,进入 .git 目录 找到 config 文件打开,添加
[user]
name = 你的用户名
email = 你的邮箱
[credential]
helper = store
保存后 push 一次,下次就不需要输入密码了
上面修改config文件和下面使用命令行作用一样:
## 添加配置
git config [--local | --global | --system] user.name 'Your name'
git config [--local | --global | --system] user.email 'Your email'
local:区域为本仓库
global: 当前用户的所有仓库
system: 本系统的所有用户
2.第二种方法
git bash进入你的项目目录,输入:
git config --global credential.helper store