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
相关推荐
Bigger16 小时前
为什么你的 Git 提交需要签名?—— Git Commit Signing 完全指南
git·开源·github
DianSan_ERP1 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
红豆子不相思2 天前
Tomcat 环境搭建与集群实战
服务器·git·tomcat
杰哥技术分享2 天前
Git 仓库迁移技术文档:从 CODING.net 迁移至腾讯云 CNB
git
梅孔立2 天前
Ansible 100 台服务器一键管控实战 进阶版
服务器·git·ansible
qq_426003962 天前
git切换当前分支到远程分支
git
ON10N2 天前
100% 纯 Vibe Coding,我是怎么用 AI 撸出一个 VS Code 插件的
git·ai编程·visual studio code
Lunar*3 天前
告别臃肿!使用 git-filter-repo 优雅清理 Git 历史记录
git
tq10863 天前
agent 记忆 = markdown + json + git
人工智能·git
何以不说话3 天前
DevOps、Git 和 GitLab
git·gitlab·devops