【问题标题】:How to update SSH passphrase in vscode?如何在 vscode 中更新 SSH 密码?
【发布时间】:2022-01-22 09:57:30
【问题描述】:

当在 VSCODE 中提示输入时,我复制粘贴了错误的 SSH 密码短语,并且由于选中了“保存”复选框,所以它被保存了。现在我无法同步到 Github。

有没有办法更新 VSCODE 中的错误密码?我搜索了设置并用谷歌搜索但找不到方法。

这是 git 日志

> git pull --tags origin master
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

编辑: 如果我按照https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories 的说明从 SSH 切换到 HTTPS,我可以提交。但如果我再次从 HTTPS 切换到 SSH,我将无法提交。

【问题讨论】:

    标签: visual-studio-code ssh


    【解决方案1】:

    可能不是 VSCode 要求输入密码,而是您的身份验证代理。在终端中尝试ssh-add -Dssh-add -l 将列出“记住”的键。

    【讨论】:

    • ssh-add -D 返回All identities removed.ssh-add -l 返回The agent has no identities.。仍然无法提交,并且 git 日志显示相同的输出
    • 那么,VSCode 现在可以工作了吗?
    • 没有。仍然无法提交,并且 git 日志在第一篇文章中显示相同的输出
    • 在 VSCode 内置终端中试试这个
    • 我不知道 VSCode 中有任何此类功能,但如果确实如此 - 也许它是这样做的扩展 - 密码可以在 ~/.vscode${workspaceFolder}/.vscode 中。无论如何,如果一个扩展正在这样做,我认为您应该向其作者报告所涉及的安全风险。
    猜你喜欢
    • 2021-05-12
    • 1970-01-01
    • 2023-01-16
    • 2021-09-16
    • 1970-01-01
    • 1970-01-01
    • 2018-09-08
    • 2022-10-07
    • 1970-01-01
    相关资源
    最近更新 更多