git pull origin [branch] 上提示输入密码
当我尝试 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果系统提示您输入密码,而不是 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 usegit remote set-url
.