先 Unset global 配置
-
任意文件夹下
Git Bash Here -
然后输入如下命令来 unset
git config --global --unset user.name git config --global --unset user.email git config --global --unset user.password在操作完上述命令后,可以用来查看情况,这不是必须的。
git config --global user.name git config --global user.email git config --global user.password # 或是者 git config --list
生成 SSH Key 并配置到 GitHub
输入如下代码来生成 ssh key
ssh-keygen -t rsa -C

文章介绍了如何通过unsetglobal配置移除Git的全局用户信息,然后生成SSHKey并添加到GitHub以实现安全的身份验证。对于多账号管理,可以通过配置~/.ssh/config文件来指定不同账户的SSH密钥。此外,还提供了优化GitHub访问速度的方法,包括在hosts文件中添加GitHub的IP地址。
最低0.47元/天 解锁文章
3万+

被折叠的 条评论
为什么被折叠?



