Git .ssh的默认路径是什么? [英] what is the default path for Git .ssh?

查看:2827
本文介绍了Git .ssh的默认路径是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 8上运行Git 1.9.4。我的操作系统安装在SSD上。我的Git安装位于另一个硬盘上。我对git很陌生。 Git如何选择将私人和公共密钥放在.ssh文件夹中的位置?我的主目录位于C:但Git安装在D :. Git是否可以识别(例如在推送时)是否存在.ssh文件夹,尽管它位于另一个路径中,那么它通常会是?

I am running Git 1.9.4 on my Windows 8. My OS is installed on a SSD. My Git installation is located on another hard drive. I'm pretty new to git. How does Git choose where to put the .ssh folder for private and public keys? My home directory is on C: but Git is installed on D:. Does Git recognize (for example when pushing) that there is a .ssh folder, although its located in another path then it would usually be?

推荐答案


Git如何选择放置 .ssh 文件夹的位置

如果您通过 git-cmd.bat ,它会在%HOME%/。ssh 中查找ssh密钥。

If you run git through git-cmd.bat, it will look for ssh keys in %HOME%/.ssh.

首页 git-cmd.bat 中定义(默认情况下:% USERFRILE%

只要设置了HOME(对于任何你想要的文件夹),Git就会使用它(即使它安装在另一个驱动器)。

As long as HOME is set (to any folder you want), Git will use it (even if it is installed on another drive).

您将使用 ssh-密钥生成 来生成你的公钥/私钥。

You will use ssh-keygen to generate your public/private keys.

同样适用于 git bash :钥匙将在〜/ .ssh 中。

这篇关于Git .ssh的默认路径是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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