首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Posh-Git在尝试从源拉取时抛出ssh错误

Posh-Git在尝试从源拉取时抛出ssh错误
EN

Stack Overflow用户
提问于 2020-07-24 03:41:44
回答 1查看 68关注 0票数 0

使用posh-git模块时,我无法从原点拉取。有没有办法用posh-git配置我现有的ssh密钥位置来使用它们?原生git运行良好。

错误详细信息:

代码语言:javascript
复制
C:\Git\MyRepo [master ≡]
> git pull origin master

    Could not create directory '/h//.ssh'.
    The authenticity of host 'domain.net (10.a.b.xyz)' can't be established.
    ECDSA key fingerprint is SHA256:nxxxx.
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    Failed to add the host to the list of known hosts (/h/.ssh/known_hosts).
    git@domain.net: Permission denied (publickey).
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
EN

回答 1

Stack Overflow用户

发布于 2020-07-24 08:06:19

我执行了以下操作来使用powershell检查我的主路径,

代码语言:javascript
复制
Command: $env:HOME
Output:  H:\

但我的计算机中没有任何H:\驱动器,所以我将其更新到.ssh文件夹所在的主目录中。

代码语言:javascript
复制
Command: [Environment]::SetEnvironmentVariable("HOME", "C:\Users\<UserName>", "User")

在我完全关闭并重新打开powershell之后,它工作了:)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63061969

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档