gpt4 book ai didi

git - 在 $git push -u origin main 命令之后,Git bash 没有请求任何身份验证,实际上什么都不做

转载 作者:行者123 更新时间:2023-12-04 16:24:28 24 4
gpt4 key购买 nike

当我尝试将我的代码上传到 github 时。以下是我在 Git Bash 终端中执行的步骤。当我尝试使用 $ 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

enter image description here

最佳答案

2021 年 10 月更新:

issue 384再次描述问题:

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.

现在已通过 PR 481 修复此问题“加快主机提供程序自动检测并使其更加健壮”(参见 commit 1f926e4)


2021 年 7 月更新:

Git for Windows 2.32.0(2)包括GCM (Git Credential Manager Core) v2.0.475.64295 ,这应该解决 issue/PR 374 (“修复在 Windows 上不显示 GUI 提示的错误”)。


原始答案(2021 年 6 月):

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

你应该:

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

你这样做:

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

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

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

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

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

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

作为临时解决方法:

git config --global credential.provider generic

请注意 microsoft/Git-Credential-Manager-Core v2.0.475刚刚发布以修复问题 364 与 PR 375 ,在 Git 2.32(2021 年 5 月)的上下文中。
latest snapshot of Git for Windows应该包括那个修复。

关于git - 在 $git push -u origin main 命令之后,Git bash 没有请求任何身份验证,实际上什么都不做,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68057254/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com