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
相关推荐
wh_xia_jun9 小时前
Git 分支合并操作备忘录
git
满天星830357711 小时前
【Git】原理及使用(三)(分支管理)
linux·git
像风一样的男人@15 小时前
warning: could not find UI helper ‘git-credential-manager-ui‘
git·ui
代钦塔拉16 小时前
Git & GitHub 从入门到精通:全流程实战教程
git·github
晚风吹红霞17 小时前
Linux下的趣味编程 —— 进度条、Git版本控制与GDB调试实战
linux·运维·git
xlq2232217 小时前
7.git
git
Ws_18 小时前
Git + Gerrit 第六课:commit --amend、Patch Set 与 Change-Id
git
AIMath~1 天前
向github中上传文件过大超过50M怎么办
网络·git·github
AIMath~2 天前
如何将一个新的文件夹使用git 工具提交到github新仓库中
git·github
满天星83035772 天前
【Git】原理及使用(二) (版本回退)
linux·git