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

相关推荐
powerfulzyh43 分钟前
Ubuntu24.04远程开机
linux·ubuntu·远程工作
ulimpid43 分钟前
Command | Ubuntu 个别实用命令记录(新建用户、查看网速等)
linux·ubuntu·command
HHoao44 分钟前
Ubuntu启动后第一次需要很久才能启动GTK应用问题
linux·运维·ubuntu
小灰兔的小白兔1 小时前
【Ubuntu】Ubuntu常用命令
linux·运维·ubuntu
GFCGUO1 小时前
ubuntu18.04运行OpenPCDet出现的问题
linux·python·学习·ubuntu·conda·pip
winds~1 小时前
ubuntu中软件的进程管理-结束软件运行
linux·运维·ubuntu
阳光不锈@1 小时前
麒麟桌面系统安装和配置Node.js
linux·麒麟系统安装node.js
bush41 小时前
使用root账号ssh登录虚拟机ubuntu
运维·ubuntu·ssh
叫我龙翔2 小时前
【Linux】进程间关系与守护进程
linux·运维·服务器·计算机网络
小诸葛的博客2 小时前
Ubuntu如何如何安装tcpdump
linux·ubuntu·tcpdump