Raj*_*nth 3 git github git-bash
当我尝试将我的代码上传到 github 时。以下是我在 GitBash 终端中执行的步骤。在尝试使用 $git push -u origin main 将代码推送到 github 时,光标移动到下一行并不断闪烁但什么也不做。
git remote add origin "https://github.com/TarunRajinikanth/Trifacta.git"
git add -A
git config --global -user.name "username"
git config --global -user.email "useremail@gmail.com"
git commit -m "this is my first commit"
git branch -m main
git push -u origin main
Run Code Online (Sandbox Code Playgroud)

2021 年 7 月更新:
Git for Windows 2.32.0(2)确实包含GCM (Git Credential Manager Core) v2.0.475.64295,它应该可以解决问题/PR 374(“修复 Windows 上不会显示 GUI 提示的错误”)。
原始答案(2021 年 6 月):
检查您git config credential.helper的缓存机制是否会成为问题。
你应该:
%PATH%(在打开 git bash 之前),以便参考C:\Program Files\Git\mingw64\libexec\git-core,你这样做:
printf "host=github.com\nprotocol=https"|git-credential-manager get
Run Code Online (Sandbox Code Playgroud)
如果您看到错误的密码,请使用以下命令将其删除:
printf "host=github.com\nprotocol=https"|git-credential-manager erase
Run Code Online (Sandbox Code Playgroud)
重复该erase命令,直到您看到一个弹出窗口(然后不要输入您的凭据)
然后重复您的git push -u origin main, 并输入您的凭据以存储它们。
请注意,git-for-windows/git issue 3268指向microsoft/Git-Credential-Manager-Coreissue 364。
作为临时解决方法:
git config --global credential.provider generic
Run Code Online (Sandbox Code Playgroud)
请注意,microsoft/Git-Credential-Manager-Corev2.0.475刚刚发布,用于在 Git 2.32(2021 年 5 月)的上下文中使用PR 375修复问题 364 。Windows 版 Git
的最新快照应包含该修复程序。