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
相关推荐
嘻嘻仙人3 天前
Ubuntu中 git上传自己的项目和二次上传一般流程
git·github
Patrick_Wilson3 天前
Squash Merge 的血缘陷阱:为什么删掉的代码又活了过来
前端·git·程序员
沉浸学习的匿名网友3 天前
什么是 .gitignore?为什么每个 Git 项目几乎都离不开它?
前端·git
深海鱼在掘金4 天前
Git 完全指南 —— 第3章:理解工作区、暂存区、版本库三个核心
git
江华森4 天前
Git 基础筑基:从原理到团队协作的全栈实战
git
JakeJiang4 天前
Git 必备命令指南:从日常高频到项目开发实战
git
叫我少年5 天前
Windows 中安装 git
git
深海鱼在掘金10 天前
Git 完全指南 —— 第1章:Git 概览与版本控制演进
git
noravinsc11 天前
关于Git Flow
git
蜜獾云11 天前
在Git中配置用户名和密码
git