據我所知,當您將 git 與 https 一起使用時,每次向 github 發出請求時都必須輸入密碼,除非您使用 SSH 或使用 git config credential.helper store 將憑據存盤在本地計算機上。
我一直在使用 HTTPS,但從來不需要輸入我的憑據。當我運行 git config --list 時,它只顯示我的電子郵件和我的名字,但不顯示我的密碼。誰能向我解釋為什么我不需要輸入密碼或密碼可以存盤在哪里?
uj5u.com熱心網友回復:
我一直在使用 HTTPS,但從來不需要輸入我的憑據。
這可能是因為您的憑據已經被憑據助手快取。
- 檢查你的是什么:
git config --global credential.helper - 檢查存盤了哪些憑據:
在 Git bash 會話中:
printf "host=github.com\nprotocol=https" | git-credential-xxx get
替換xxx為回傳的值git config --global credential.helper。
如果它是空的,并且遠程 URL 是 HTTPS 的,那么,正如LeGEC在評論中所建議的那樣,Git 可能仍然使用帶有指令的url.<base>.pushInsteadOfSSH。
檢查:
git config --show-origin --list --show-scope | grep -i insteadOf
OP在評論中添加:
running
git config --show-origin --list給了我,除其他外,file:/Applications/Xcode.app/Contents/Developer/usr/share/git-core/gitconfig credential.helper=osxkeychain
所以它看起來像是存盤在我的 osxkeychain 中?
如果是這樣的話:
printf "host=github.com\nprotocol=https" | git-credential-osxkeychain get
另請參閱“從 macOS 鑰匙串更新憑據”。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/525481.html
標籤:混帐
上一篇:如何在Java中使用布林值驗證True和False的確切值?
下一篇:Git切換分支不丟失更改
