git 免密的方法

方法一:

复制代码
通过生成credential配置
git config --global credential.helper store
查看.gitconfig文件,发现多了一行
[credential] helper = store

方法二:

复制代码
修改仓库中.git/config文件
url = http://账号:密码@git.test.com.cn/test/xx.git


或者带着账号密码去克隆代码
git clone http://账号:密码@git.test.com.cn/test/xx.git


另一种简单的方式是创建 ~/.git-credentials 配置文件,在配置文件中添加一行:
https://用户名:密码@test.com.cn

方法三:

复制代码
直接修改.gitconfig配置文件,加入password = xxx
window目录: C:\Users\Administrator/.gitconfig

linux目录: ~/.gitconfig

[user]
    name = xxx
    email = xxx@xx.com
    password = xxx
相关推荐
shark1 分钟前
无需放弃变更、关闭占用程序!用暂存区和 git底层命令实现 Git 变更备份
git·shell·自动化运维
_poplar_38 分钟前
15 【C++11 新特性】统一的列表初始化和变量类型推导
开发语言·数据结构·c++·git·算法
北城笑笑1 小时前
Git 10 ,使用 SSH 提升 Git 操作速度实践指南( Git 拉取推送响应慢 )
前端·git·ssh
蓁蓁啊6 小时前
GIT使用SSH 多账户配置
运维·git·ssh
相与还11 小时前
IDEA和GIT实现cherry pick拣选部分变更到新分支
git·elasticsearch·intellij-idea
刘志辉18 小时前
git指令
git
2501_9167665421 小时前
【Git学习】初识git:简单介绍及安装流程
git·学习
孤独的追光者1 天前
Git 完整流程:从暂存到推送
git
平平无奇。。。1 天前
版本控制器之Git理论与实战
linux·git·gitee·github
这周也會开心1 天前
Git介绍和使用
git