问题描述
我意外删除了我的.gitconfig。我添加了新的标识符
$ g $ g $ git add [file]
git remote ... [identity addition]
当Git未将包含我的秘密令牌的.gitconfig文件发送到我的主页时,我感到很惊讶。
Git必须将秘密标记放在其他地方。但是,我一直无法找到该位置。
数据不在.gitconfig的原因可能是我的.gitconfig位于我的.gitignore文件中。
当git不在家的.gitconfig中时,Git将用户的秘密令牌保存在哪里?
GitHub使用SSH身份验证,因此您的令牌将存储在SSH客户端存储的任何位置。在Linux上它会在〜/ .ssh下。
我想你可能意味着git会在哪里存储有关配置信息你的遥控器?通常它不在你的〜/ .gitconfig中。通常它位于项目根目录下.git目录下的config文件中。
I removed my .gitconfig by accident. I added new identies by
git add [file]
git remote ... [identity addition]
I am surprised when Git did not make a .gitconfig file which contain my secret tokens to my Home.
Git must have put the secret tokens elsewhere. However, I have not been able to find the location.
The reason for that the data is not at .gitconfig may that I have .gitconfig at my .gitignore -file.
Where does Git save the user's secret tokens for github when they are not at Home's .gitconfig?
GitHub uses SSH authentication so your tokens will be stored wherever your SSH client stores them. On Linux it would be under ~/.ssh.
I think you might mean where does git store the configuration information about your remotes? Usually it's not in your ~/.gitconfig. Usually it's in the "config" file under the ".git" directory in the root of your project.
这篇关于Git在默认情况下保存用户的秘密令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!