github - How to set the ssh private key for the portable version of git (that is, the version installed on a USB flash drive)?
淡淡烟草味
淡淡烟草味 2017-05-02 09:43:52
0
1
1202

The portable version of git is plug-and-play and can be used on any computer that does not have git installed. If I use the same method as the desktop version of git to set up the ssh private key, I will not be able to use ssh to access the github remote warehouse normally, even if I save the private key on the USB flash drive. Here is the error message:

The authenticity of host 'github.com (192.30.253.112)' can't be
established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes /no)? yes
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of know
n hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I want to know how to set up the ssh private key in the portable version of git to ensure that I can connect to the remote repository normally.

淡淡烟草味
淡淡烟草味

reply all(1)
黄舟

I found the configuration method based on the readme file in the git mobile version. In fact, the method is very simple. The configuration steps are basically the same as the method of configuring ssh-key in the desktop version of git, except that the step of selecting the storage path of the key is different - do not press Enter to use the default path, but change the path to a USB flash drive. The path to the git version (such as g:\git_portable\.ssh). Then, every time you use git (mobile version), first use the export HOME=g:\git_portable临时修改HOMEenvironment variable, and the subsequent installation path of the mobile version of git should be set according to your actual situation.
This way you can use ssh to access your github remote repository just like in the desktop version of git.
Note, don’t ignore the double slash \ in the above path.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template