简体   繁体   English

如何在 Ubuntu 上使用 Git Credential Manager 存储 Github 令牌?

[英]How can I store Github token with Git Credential Manager on Ubuntu?

With the new Git Credential Manager (GCM) how can I use it to store Github access token on Ubuntu?使用新的 Git 凭据管理器 (GCM),我如何使用它在 Ubuntu 上存储 Github 访问令牌? I have tried to read the usage text and it is not clear how one can store Github token using it.我试图阅读使用文本,但不清楚如何使用它存储 Github 令牌。

You can store it with:您可以将其存储在:

printf "host=github.com\nprotocol=https\nusername=you\npassword=yourToken" | \ 
  git credential-manager-core store

Make sure git-credential-manager is in your $PATH .确保git-credential-manager在你的$PATH中。
Replace ' you ' with your GitHub account name, and ' yourToken ' by your GitHub token.将“ you ”替换为您的 GitHub 帐户名,将“ yourToken ”替换为您的 GitHub 令牌。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Ubuntu 上对 Github 进行身份验证? git: 'credential-netrc' 不是 git 命令 - How to authenticate Github on Ubuntu? git: 'credential-netrc' is not a git command 如果 windows 显示令牌,git 凭证管理器核心如何安全 - How is git credential manager core for windows secure if it displays token 如何在 Windows 的 Git Credential Manager 中的每个 repo 本地存储凭据? - How to store credentials locally per repo in Git Credential Manager for Windows? 如何在 WSL(Windows 上的 Ubuntu)上使用 Git 凭证存储? - How to use Git credential store on WSL (Ubuntu on Windows)? 如何禁用适用于 Windows 的 Git 凭据管理器? - How do I disable Git Credential Manager for Windows? 如何将 windows 凭证管理器与 ubuntu 连接 - How to connect windows credential manager with ubuntu 我如何破坏“git credential-'store”? - How do I decorrupt "git credential-'store"? 如何确定Windows版Git Credential Manager的版本? - How to determine the version of Git Credential Manager for Windows? 我可以在同一本地系统中使用多个 git 帐户吗(在凭据管理器中) - can i use multiple git accounts in same local system(in Credential Manager) 使用 vscode ssh 拉取、获取、推送、克隆时,我无法通过“git-credential-manager get”步骤 - I can not pass “git-credential-manager get” step when pulling, fetching, pushing, cloning with vscode ssh
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM