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?
相关问题
- How to add working directory to deployment in GitH
- JavaScript File Transfer SSH
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
相关文章
- 请教Git如何克隆本地库?
- java开发bug问题:GitHub授权登录无法获取授权账号信息?
- Check if directory exists on remote machine with s
- Is there a Github markdown language identifier for
- “no implicit conversion of Integer into String” er
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
If you run git through
git-cmd.bat
, it will look for ssh keys in%HOME%/.ssh
.HOME
is defined ingit-cmd.bat
(by default:%USERPROFILE%
)As long as HOME is set (to any folder you want), Git will use it (even if it is installed on another drive).
You will use
ssh-keygen
to generate your public/private keys.The same applies for
git bash
: the keys will be in~/.ssh
.This answer definitely led me on the right track.
Using the command
ssh-keygen -t rsa -C "your_email@example.com"
is correct.Git will create this .ssh folder under %HOME%/.ssh as stated, but only if you do not define a file yourself, such as key.txt for example. This guide really helped me: Generating SSH keys