我的远程 git 存储库密码存储在本地机器上的什么地方?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42584934/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is my remote git repository password stored on the local machine?
提问by Rahul Yadav
I have a git repository set up on bitbucket
我在 bitbucket 上设置了一个 git 存储库
$ git remote -v
origin https://[email protected]/myusername/my_repository_name.git (fetch)
origin https://[email protected]/myusername/my_repository_name.git (push)
I pull and push to the repository from my office workstation and home PC. When I push or pull from my office workstation, it prompts me for the password. However when I push or pull from my home PC it doesn't prompt for a password.
我从我的办公室工作站和家用 PC 拉取并推送到存储库。当我从办公室工作站推或拉时,它会提示我输入密码。但是,当我从家用 PC 推或拉时,它不会提示输入密码。
I don't specifically remember what I did on my home PC to remember the password.
我不记得我在家用 PC 上做了什么来记住密码。
running $ git config credential.helper
returns manager
运行$ git config credential.helper
回报manager
$ git config credential.helper
manager
Contents .gitconfig
file in my user folder at root level
.gitconfig
我的用户文件夹中根级别的内容文件
[user]
name = myusername
email = [email protected]
Where is the password stored on the local disk?
本地磁盘上存储的密码在哪里?
What is the command to check the status of current credentials?
检查当前凭据状态的命令是什么?
How do I similarly remember the password on my office workstation?
我如何同样记住办公室工作站上的密码?
Note: I am using Windows 7
注意:我使用的是 Windows 7
回答by Rahul Yadav
if $ git config credential.helper
returns manager
, the password is stored in the windows credential manager, if it returns store
, password is stored in a .git-credentials
file in the user folder.
如果$ git config credential.helper
返回manager
,则密码存储在 Windows 凭据管理器中,如果返回store
,则密码存储在.git-credentials
用户文件夹中的文件中。
回答by Philippe
With the default configuration of git on windows, this is stored in Windows under: control panel
=> User
=> Credential manager
.
使用 Windows 上 git 的默认配置,它存储在 Windows 下:control panel
=> User
=> Credential manager
。
See a more details answer: https://stackoverflow.com/a/51437252/717372
查看更多详细答案:https: //stackoverflow.com/a/51437252/717372