git - 配置 Git 客户端,例如 GitHub for Windows,不要求身份验证

标签 git github github-for-windows

我已经安装了 GitHub for Windows 和 GitExtensions,并且在我的路径中有多个版本的 git.exe。

enter image description here

C:\Users\Rajat\AppData\Local\GitHub\PortableGit_93e8418133eb85e81a81e5e19c272776524496c6\cmd\git.exe
C:\Users\Rajat\AppData\Local\GitHub\PortableGit_93e8418133eb85e81a81e5e19c272776524496c6\bin\git.exe
E:\cygwin\bin\git.exe
C:\Program Files (x86)\Git\cmd\git.exe
C:\Program Files (x86)\Git\bin\git.exe

现在,当我对最后三个 git.exe 中的任何一个执行 git push origin master 时,它会询问我的用户名。但是 Portable Git 不要求用户名。请参见以下屏幕截图:

enter image description here

心形字符只是一个 ^C 所以忽略它。

在这种情况下如何处理身份验证?最终我希望最后三个 Git 不请求授权。这怎么可能?

我在 GitHub 的 Git 中发现了两个额外的文件,但我怀疑它们是否重要:

enter image description here

最佳答案

如果您使用的是 Windows 版 GitHub,您需要做的就是:

  1. 确保您至少登录过一次 GUI 应用
  2. 点击“Git Shell”链接

GitHub 已经在命令行上为您解决了这个问题,适用于 HTTPS 和基于 SSH 的远程

关于git - 配置 Git 客户端,例如 GitHub for Windows,不要求身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13800289/

相关文章:

xcode - merge 分支的 Xcode 分支部分中的顶部箭头是什么意思?

Git 要求输入错误 URL 的密码

node.js - 如何使用他们的 API 将有效图像保存到 Github?

php - 为什么 Composer 无法找到/安装我的 Laravel 5.2 包?

git - Git如何选择重新设定基准的起点?

git 2018 : Is there a way to rename a branch at remote for all users?

node.js - ssh 没有那个文件或目录

javascript - Github Windows : Working with 'master' and 'gh-pages' branches

GitHub:将分支映射到 Windows 上的不同本地目录

git - 使用 AppHarbor 时,如何正确管理开发和实时配置文件?