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
相关推荐
胡斌附体38 分钟前
linux(ubuntu)拉取源码进行docker容器部署
linux·git·ubuntu·docker·node·nvm
阿白逆袭记2 小时前
Git原理与使用详解(六):连接世界——远程仓库与多人协作入门
git
阿白逆袭记2 小时前
Git原理与使用详解(十):Git大师之路——总结与最佳实践
大数据·git·elasticsearch
C++ 老炮儿的技术栈4 小时前
不调用C++/C的字符串库函数,编写函数strcmp
c语言·开发语言·c++·人工智能·windows·git·visual studio
阿白逆袭记4 小时前
Git原理与使用详解(七):团队交响曲——多人协作开发实战
git
阿白逆袭记5 小时前
Git原理与使用详解(一):版本控制之殇与Git的救赎
git
阿白逆袭记8 小时前
Git原理与使用详解(八):企业级Git工作流与DevOps实践
git·elasticsearch·devops
阿白逆袭记8 小时前
Git原理与使用详解(四):时光回溯——版本回退与修改撤销
大数据·git·elasticsearch
春日见9 小时前
Git 相关操作大全
linux·人工智能·驱动开发·git·算法·机器学习
@zulnger9 小时前
git的基本操作
git