[英]What is the difference between git config --list and cat .gitconfig?
[英]What's the difference between using .gitconfig and git-credential-helper?
我所有的憑據都在 .gitconfig 中 -
─[$] cat .gitconfig
1 [user]
2 name = Shirish Agarwal
3 email = xxxxx@xxx.com
4 [core]
5 editor = leafpad
6 excludesfiles = /home/shirish/.gitignore
7 gitproxy = \"ssh\" for gitorious.org
8 [merge]
9 tool = meld
10 [push]
11 default = simple
12 [color]
13 ui = true
14 status = auto
15 branch = auto
現在我看到這個https://help.github.com/articles/caching-your-github-password-in-git/ 。 轉移到 git-credential-helper 有什么好處,還是只有在 github.com 上才有好處?
您似乎正在使用 SSH 連接到遠程 git 存儲庫。 在您的情況下,您將不需要使用git-credential-helper
。
請注意,在您鏈接的 Github 文檔中,它說:
如果您使用 SSH 克隆 GitHub 存儲庫,則您使用 SSH 密鑰而不是用戶名和密碼進行身份驗證。
這也適用於 Github 之外的 git repos。
如果您未通過 SSH 連接,則每次獲取或推送時都會要求您輸入密碼。
git-credential-helper
幫助您保存密碼,這樣您就不必每次都輸入密碼。 在 OSX/macOS 上, osxkeychain
將密碼存儲在 OS 鑰匙串中。 我不熟悉它在其他操作系統上的工作方式。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.