[英]Where is my remote git repository password stored on the local machine?
我在 bitbucket 上設置了一個 git 存儲庫
$ git remote -v
origin https://myusername@bitbucket.org/myusername/my_repository_name.git (fetch)
origin https://myusername@bitbucket.org/myusername/my_repository_name.git (push)
我從我的辦公室工作站和家用 PC 拉取並推送到存儲庫。 當我從我的辦公室工作站推或拉時,它會提示我輸入密碼。 但是,當我從家用 PC 上推或拉時,它不會提示輸入密碼。
我不記得我在家用電腦上做了什么來記住密碼。
運行$ git config credential.helper
返回manager
$ git config credential.helper
manager
根目錄下我的用戶文件夾中的.gitconfig
文件
[user]
name = myusername
email = user.name@email.com
密碼存儲在本地磁盤的什么位置?
檢查當前憑據狀態的命令是什么?
我如何同樣記住辦公室工作站上的密碼?
注意:我使用的是 Windows 7
如果$ git config credential.helper
返回manager
,則密碼存儲在 windows 憑據管理器中,如果返回store
,則密碼存儲在用戶文件夾中的.git-credentials
文件中。
使用 Windows 上 git 的默認配置,它存儲在 Windows 下: control panel
=> User
=> Credential manager
。
查看更多詳細答案: https : //stackoverflow.com/a/51437252/717372
`sudo cat ~/.git-credentials`
如果您在本地保存了憑據,則會產生https://<USERNAME>:<PASSWORD_OR_TOKEN_IN_USE>@github.com
在我的情況下git config credential.helper
是空的(本地和全局兩者)。 結果證明憑證存儲在 KWallet 中。 這些可以在“密碼”下的 ksshaskpass 下的 KWalletManager 中找到(即使我為此特定存儲庫使用 HTTPS 身份驗證)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.