linux git凭证管理

linux git 凭证管理

解决命令行git登录github的问题,支持两步验证
同样适用于Azure Devops, Bitbucket

官网:
https://github.com/git-ecosystem/git-credential-manager
https://github.com/git-ecosystem/git-credential-manager/blob/release/docs/install.md

安装

https://github.com/GitCredentialManager/git-credential-manager/releases/latest下载对应的包

shell 复制代码
# debian系列为例
sudo dpkg -i gcm-manager-xxx.deb

配置

不要使用git-credential-manager configure来配置,默认显示UI

中文可能有字体问题,命令行环境下非常不友好。

shell 复制代码
# 全不全局看需求
git config --global credential.helper "/usr/local/bin/git-credential-manager --no-ui"
git config --global credential.credentialStore secretservice

# 配置某个项目的凭证用户名
cd yourproject
git config credential.username yourname

注意

1、运行代码前确保知晓代码含义,以及去除CSDN添加的尾巴。
2、本文仅做技术交流,因任何原因导致的任何问题,本文概不负责。
3、使用UI去除 --no-ui即可。

相关推荐
吴声子夜歌4 分钟前
Shell编程——开发规范
linux·运维·shell
Shadow(⊙o⊙)7 分钟前
epoll三大接口到内核+正确认识应用层与内核的联系(6000字)
linux·服务器·网络
皓月盈江8 分钟前
Linux系统使用VSCode搭建GO开发环境
linux·vscode·ubuntu·golang·debian
ShiXZ21312 分钟前
SSH 客户端常用指令与配置速查手册
运维·ssh
pt104314 分钟前
Cisco Splunk for AI Operations:AIOps机器学习
运维·网络·人工智能·机器学习
CHHH_HHH17 分钟前
【Linux系统篇】进程间通信揭秘:从管道到共享内存
linux·服务器·c语言·开发语言·后端·ubuntu
.冰块.18 分钟前
华为云计算服务学习笔记|ECS + 镜像 IMS + 弹性伸缩 AS 完整踩坑实录
linux·华为云·ims·as·ecs·弹性云服务器·计算类云服务
putItInYourHand19 分钟前
Docker Compose 部署 Mosquitto MQTT Broker 完整实战指南
运维·docker·容器
Larru-Sun34 分钟前
Nginx + Vue Router 基础:SPA History 部署、反向代理与请求分流
运维·vue.js·nginx
考虑考虑9 小时前
cmd局部设置java变量
运维·后端·自动化运维