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即可。

相关推荐
zzzzzz31011 小时前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode11 小时前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户0328472220701 天前
如何搭建本地yum源(上)
运维
A小辣椒2 天前
TShark:Wireshark CLI 功能
linux
A小辣椒2 天前
TShark:基础知识
linux
AlfredZhao3 天前
OCI 明明分配了 200G 系统盘,为什么 df 只看到 30G?
linux·oci
AlfredZhao3 天前
vi 删除指定范围的行,不用再反复按 dd
linux·vi
用户9718356334663 天前
银河麒麟 KY10 申威(SW64) 安装 nginx-1.16.1-2.p01.ky10.sw_64.rpm 详细步骤
linux
深海鱼在掘金3 天前
Git 完全指南 —— 第1章:Git 概览与版本控制演进
git
猪脚踏浪3 天前
linux 拷贝文件或目录到指定的位置
linux