git pull origin [branch] 上提示输入密码

发布于 2024-12-07 09:52:59 字数 568 浏览 1 评论 0原文

当我尝试 git pull origin [branch] 以便提取对存储库的更改时,系统会提示我输入密码。我的系统密码,只需按回车键即可返回:“致命:身份验证失败”。

问题是,我过去从未为这个项目输入过密码,上周开始时也不是这样,从那以后我推拉的任何时候也不是这样。与我的客户交谈时,他们认为这是我的 SSH 密钥的问题。

我仔细检查了密钥并确保它们正确,运行 ssh [email protected]。我收到:

嗨 bdkay!您已成功通过身份验证,但 GitHub 不提供 shell 访问权限。 与 github.com 的连接已关闭。

这让我认为它成功了。然而,就在这之前,出现了一条麻烦的行:“通道 0 上的 PTY 分配请求失败”。客户说我仍然被添加到 github 的存储库中,并且他们最终没有更改任何内容。我仍在同一台机器上工作,但似乎无法通过谷歌或搜索此网站找到修复程序。非常感谢任何帮助。

When I attempt to git pull origin [branch] in order to pull in changes to the repo, I am prompted for a password. My system password and just hitting enter return: "fatal: Authentication failed".

The thing is, I never entered a password for this project in the past and this was not the case when I began it last week, nor any of the times I pushed and pulled since then. Speaking to my client, they thought it was something with my SSH keys.

I double checked the keys and made sure they were correct, running ssh [email protected]. I'm getting:

Hi bdkay! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

which makes me think it succeeded. However, right before that a troublesome line reading: "PTY allocation request failed on channel 0" occurs. The client says I'm still added to the repo in github and they have not changed anything on their end. I'm still working on the same machine but cannot seem to find a fix through google or searching this site. Any help is greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

煞人兵器 2024-12-14 09:52:59

如果系统提示您输入密码,而不是 SSH 密钥的密码,则说明您没有使用 SSH URL。 HTTPS 要求用户/密码身份验证,SSH 使用密钥/密码。使用 git remote -v 检查远程 URL,如果需要修复它,请使用 git remote set-url

If you're being prompted for a password, and not your SSH key's passphrase, then you're not using the SSH URL. HTTPS asks for user/pass auth, SSH uses key/passphrase. Check your remote's URL with git remote -v, and if you need to fix it use git remote set-url.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文