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
相关推荐
摆烂z5 小时前
AI同时完成多个功能(Git WorkTree)
git
___波子 Pro Max.10 小时前
Git Worktree 可视化理解指南
git
happymaker062611 小时前
git使用快速入门
git
不做超级小白12 小时前
从零到可用:在手机上用 Termux + Git + Obsidian 打造稳定同步环境(踩坑全记录)
git·智能手机
凡客丶12 小时前
Git安装与使用保姆教程【超详细】
git
android_cai_niao12 小时前
给Git项目添加多个远程仓库
git·gitee·github
胡小禾12 小时前
多账号下git自动切号
git
zhensherlock12 小时前
Protocol Launcher 系列:Working Copy 提交与同步全攻略
javascript·git·typescript·node.js·自动化·github·js
前端若水12 小时前
Git 全命令超级详细指南
大数据·git·elasticsearch
SiYuanFeng1 天前
新手学Git:如何把本地 Git 项目上传到 GitHub
git·github