Trying to “install” github, .ssh dir not there

2019-03-01 01:35发布

问题:

I'm following the step by step directions of github. I'm trying to install it on windows 7.

The documentation states the key will be stored in /users/tedpottel/.ssh/. I turned on hidden files, and still can't see the folder. Then I tried to create a new folder with the same file name, .ssh, I got a invalid file name error. Windows will not let me create a file name begining with a period.

I'm a little confused, wouldn't .ssh be a invalid file name? I'm stuck, any help would be GREAT

回答1:

You should be able to create your ssh directory in a DOS session:

cd c:\Users\tedpottel
mkdir .ssh

Use the git-cmd.bat provided by msysgit to launch your DOS session.
Path like /users/tedpottel/.ssh/ are unix-like paths that you can use in a bash session, also included in msysgit.

In that git-cmd.bat, the environment variable HOME will be set to c:\Users\tedpottel, which is important if you want ssh to works properly (it will look for public/private keys in %HOME%\.ssh).