无论我做什么,如何使用错误的.ssh目录修复Cygwin? [英] How to fix Cygwin using wrong .ssh directory no matter what I do?

查看:60
本文介绍了无论我做什么,如何使用错误的.ssh目录修复Cygwin?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Cygwin机器上, $ HOME cygwdrive/c/Users/me (即有时不是/home/me 的默认值)我很感激.

On my Cygwin machine $HOME is cygwdrive/c/Users/me (i.e. not the sometimes default of /home/me) which I appreciate.

但是,当我使用git并尝试使用ssh密钥时,它总是在/home/me/.ssh 中签入我的密钥.

However, when I am using git, and trying to use ssh keys, it always checks in /home/me/.ssh for my keys.

要解决此问题,我尝试了此解决方案,但是在其中放入了 config 文件〜/.ssh 不起作用,因为然后将同一文件复制到/home/me/.ssh ,因为这是git(从Cygwin运行时)的外观

To get around this, I tried this solution however, putting a config file in ~/.ssh doesn't work because I then have copy that same file to /home/me/.ssh because that is where git (when run from Cygwin) looks.

有什么办法可以避免这种情况吗?就目前而言,我必须在每个位置复制文件或链接它们(我想避免).我不明白的是,为什么git坚持认为我的主文件夹不同于实际文件夹.

Is there some way I can avoid this? As it stands right now I have to duplicate the file in each place or link them (which I want to avoid). What I do not understand is why git insists on thinking my home folder is different than it actually is.

推荐答案

如Cygwin邮件列表中所述:
https://cygwin.com/ml/cygwin/2016-06/msg00404.html

As explained on Cygwin mailing list:
https://cygwin.com/ml/cygwin/2016-06/msg00404.html

OpenSSH从不遵守$ HOME.它明确检查您的主目录用户数据库中的设置.看 https://cygwin.com/cygwin-ug-net/ntsec.html 适用于各种方法设置您的主目录.

OpenSSH never honors $HOME. It checks explicitely for your home dir setting in the user DB. See https://cygwin.com/cygwin-ug-net/ntsec.html for various methods setting your home dir.

这篇关于无论我做什么,如何使用错误的.ssh目录修复Cygwin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆