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
相关推荐
flow_code16 分钟前
切换git账户
git
春生野草4 小时前
Gituee
git·gitee
222you4 小时前
Git推送本地仓库到远程
git
小贾要学习6 小时前
如何在Linux操作系统环境下使用git命令提交文件到远程仓库
linux·运维·git
J2虾虾6 小时前
WebStorm的项目绑定Git并上传到gitee
git·gitee·webstorm
虾说羊6 小时前
git分支管理介绍和stash命令
git
71-38 小时前
git 和 tortoisegit的快速使用教学(上传至gitee或GitHub)
git·gitee
唐青枫13 小时前
为什么 .gitignore 不生效?其实你忘了用 git rm --cached!
git
代码or搬砖1 天前
Git学习笔记(三)
笔记·git·学习
虾说羊1 天前
git连接远程仓库并拉去推送以及克隆命令
git