I have just installed Git For Windows, and created my SSH key using SSH through Cygwin. It seems to be working from command-line and the Git For Windows GUI, but now I want to use TortoiseGit. TortoiseGit uses a Putty-like SSH client by default but apparently GitHub only accepts (open)SSH, and I don't really know how to proceed. I will be doing a clean TortoiseGit install, I already have Cygwin and Git for Windows installed.
相关问题
- How to add working directory to deployment in GitH
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
相关文章
- 请教Git如何克隆本地库?
- java开发bug问题:GitHub授权登录无法获取授权账号信息?
- 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?
- Is there a version control system abstraction for
For anyone looking to change an existing TortoiseGit installation to use PuTTY rather than OpenSSH, simply right-click, -> TortoiseGit -> Settings -> Network, then change 'ssh.exe' to 'tortoiseplink.exe'. From then on, doing a push/pull should be using Pageant (and any keys you have set up in there) if you also have that running.
The easiest way would be first installing TortoiseGit then msysgit with the setting SSH client to TortoisePLink. Use the TortoiseGit Puttykey generator to create a new keypair add your public key to GitHub.
Clone/create a new repository. In thee Tortoise repository settings, set your fullname and email. Then in remote menu under the Git configuration menu enter your clone URL and select your PuTTY key. GitHub works just fine with PuTTY keys. I have friends that use it, and I used it myself too.
1) Cygwin
Use the approach described in the article Working with SSH key passphrases.
A password will be asked for only once on the Cygwin session startup. !!! Before exiting the Cygwin session don't forget to kill the ssh-agent process (use ps for find process PID and kill -9).
We are using a separate approach for Cygwin, because Cygwin by some reason doesn't see processes started externally in a Windows environment.
2, 3) MsysGit, TortoiseGit
Useful link: http://dogbiscuit.org/mdub/weblog/Tech/WindowsSshAgent
Install MsysGit. Install TortoiseGit (check openssh instead of plink during installation). !!! Check systems variables. If there is GIT_SSH variable present - remove it.
Go to TortoiseGit -> Settings -> General.
Set the Git EXE path to <MsysGitHome>/bin. Set the external DLL path to <MsysGitHome>/mingw/bin.
Go to TortoiseGit -> Settings -> Network. Set the SSH Client property to <MsysGitHome>/bin/ssh.exe
Define system variable SSH_AUTH_SOCKS=C:\temp.ssh-socket
Start cmd.exe and execute following commands (since we installed MsysGit all following commands are accessible in cmd - <MsysGit>/bin is added to system PATH variable):
That's it. From that moment you can execute
git push
,git pull
from TortoiseGit and MsysGit without a prompting passphrase.When ssh-agent is no longer required you can kill it through Windows Task Manager.