货物使用SSH生成:GIT错误:无法验证SSH会话:; class = ssh(23)

发布于 2025-02-05 06:46:07 字数 1133 浏览 3 评论 0原文

目前,我正在努力与SSH合作正常工作。 使用HTTPS从GITHUB生成的工作正常。 我也没有使用ITSELVE的Git的问题,但是出于某种晦涩的原因,货物的产生并不能很好地发挥作用。 这是我出现的错误,在试图克隆一个简单的模板之后:

cargo generate [email protected]:VirtualNonsense/rust_bluepill_minimal_template.git
 Using application config: C:\Users\VirtualNonsense\.cargo\cargo-generate.toml
 Using ssh-identity from application config: $HOME/.ssh/id_rsa
 Favorite [email protected]:VirtualNonsense/rust_bluepill_minimal_template.git not found in config, using it as a git repo url
 Using private key: `%userprofile%\.ssh\id_rsa` for git-ssh checkout
Error:  Git Error: Failed to authenticate SSH session: ; class=Ssh (23)

我的货物生成。toml文件仅由以下几行组成:

[defaults]
ssh_identity = "$HOME/.ssh/id_rsa"

我已经看到,密码受保护的键似乎存在问题,所以我确保我的没有一个。我还绑了一个ED25519密钥,但也没有改变结果。 我觉得我错过了一些明显的东西,并感谢一些指导

I'm currently struggling getting cargo-generate to work properly with ssh.
Generating from github using https works fine.
I have no issues using git by itselve as well, but for some obscure reason cargo generate does not play nicely with it.
Here is the error I am presented with, after trying to clone a simple template of mine:

cargo generate [email protected]:VirtualNonsense/rust_bluepill_minimal_template.git
 Using application config: C:\Users\VirtualNonsense\.cargo\cargo-generate.toml
 Using ssh-identity from application config: $HOME/.ssh/id_rsa
 Favorite [email protected]:VirtualNonsense/rust_bluepill_minimal_template.git not found in config, using it as a git repo url
 Using private key: `%userprofile%\.ssh\id_rsa` for git-ssh checkout
Error:  Git Error: Failed to authenticate SSH session: ; class=Ssh (23)

My cargo-generate.toml file consists only of the following lines:

[defaults]
ssh_identity = "$HOME/.ssh/id_rsa"

I've seen that there seems to be an issue with passphrase protected keys so I made sure mine does not have one. I also tied an ed25519 key but it did not change the result as well.
I feel like I'm missing something obvious and would appreciate some guidance????

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文