在 $git push -u origin main 命令之后,Git bash 没有请求任何身份验证字面上什么都不做 [英] After $git push -u origin main command, Git bash is not requesting any authentication literally does nothing

查看:381
本文介绍了在 $git push -u origin main 命令之后,Git bash 没有请求任何身份验证字面上什么都不做的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试将我的代码上传到 github 时.以下是我在 GitBash 终端中执行的步骤.在尝试使用 $git push -u origin main 将代码推送到 github 时,光标移动到下一行并一直闪烁但什么也不做.

git remote add origin "https://github.com/TarunRajinikanth/Trifacta.git";git add -Agit config --global -user.name "用户名";git config --global -user.email "useremail@gmail.com";git commit -m "这是我的第一次提交";git 分支 -m 主git push -u origin main

解决方案

2021 年 10 月更新:

issue 384 再次描述了这个问题:><块引用>

在主机提供程序自动检测期间,当 GCM 对远程进行 HTTP 调用时,这有时会挂起,直到很长的超时时间过去.

此问题现已通过 PR 481 修复"加快主机提供商的自动检测并使其更加强大"(请参阅 commit 1f926e4)


2021 年 7 月更新:

Git for Windows 2.32.0(2) 确实包括 GCM(Git CredentialManager Core) v2.0.475.64295,应该可以解决issue/PR 374(修复了 Windows 上不显示 GUI 提示的错误").


原始答案(2021 年 6 月):

检查您的 git config credential.helper 以查看缓存机制是否是问题.

你应该:

  • 再次检查我们的 %PATH%(在打开 git bash 之前),以便引用 C:Program FilesGitmingw64libexecgit-core,
  • 仔细检查 Windows 凭据管理器中存储的内容

你这样做:

 printf "host=github.com
protocol=https"|git-credential-manager get

如果您看到错误的密码,请使用以下命令将其删除:

printf "host=github.com
protocol=https"|git-credential-manager 擦除

重复 erase 命令,直到看到一个弹出窗口(然后不要输入您的凭据)

然后重复您的git push -u origin main,并输入您的凭据以存储它们.

注意git-for-windows/git issue 3268指向 microsoft/Git-Credential-Manager-Core 问题 364.

作为临时解决方法:

git config --global credential.provider generic

注意microsoft/Git-Credential-Manager-Core v2.0.475 刚刚发布,用于通过 PR 375,在 Git 2.32(2021 年 5 月)的上下文中.
Git for Windows 的最新快照 应该包含该修复.>

When I am trying to upload my code to github. Below are the steps which I executed in GitBash terminal. While trying to push the code to github using $git push -u origin main the cursor moved to next line and keeps blinking but does nothing.

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

解决方案

Update Oct. 2021:

issue 384 describes again the problem:

During the host provider auto-detection when GCM makes a HTTP call to the remote, this can sometimes hang until a long timeout period has elapsed.

This now has been fixed with PR 481 "Speed up host provider auto-detection and make more robust" (see commit 1f926e4)


Update July 2021:

Git for Windows 2.32.0(2) does include GCM (Git Credential Manager Core) v2.0.475.64295, which should solve the issue/PR 374 ("Fix bug where GUI prompts would not be shown on Windows").


Original answer (June 2021):

Check your git config credential.helper to see if a caching mechanism would be the issue.

You should:

  • double-check our %PATH% (before opening a git bash), in order to reference C:Program FilesGitmingw64libexecgit-core,
  • double-check what is stored in the Windows Credential Manager

you do that with:

 printf "host=github.com
protocol=https"|git-credential-manager get

If you see the wrong password, remove it with:

printf "host=github.com
protocol=https"|git-credential-manager erase

Repeat the erase command until you see a popup (do not enter your credentials then)

Then repeat your git push -u origin main, and enter your credentials to store them.

Note that git-for-windows/git issue 3268 points to microsoft/Git-Credential-Manager-Core issue 364.

As a temporary workaround:

git config --global credential.provider generic

Note that microsoft/Git-Credential-Manager-Core v2.0.475 has just been released to fix issue 364 with PR 375, in the context of Git 2.32 (May 2021).
The latest snapshot of Git for Windows should include that fix.

这篇关于在 $git push -u origin main 命令之后,Git bash 没有请求任何身份验证字面上什么都不做的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆