简体   繁体   English

SSH无法与TortoiseGit和Pageant一起使用

[英]SSH not working with TortoiseGit and Pageant

I'm currently setting up TortoiseGit on my system but there's a problem with the SSH connection to my remote repos. 我目前正在系统上设置TortoiseGit,但与远程存储库的SSH连接存在问题。

I use git from my Cygwin installation (since I rely on UNIX commands) on my Windows machine. 我在Windows计算机上使用Cygwin安装中的git(因为我依赖UNIX命令)。 For handling all of my keys I'm using Putty Pageant, and for using them through the bash I installed a module called ssh-pageant . 为了处理我所有的密钥,我使用了Putty Pageant,并且通过bash使用它们,我安装了一个名为ssh-pageant的模块。

When using the bash I'm able to work with my remote repos (since I'm starting ssh-pageant right after opening the bash console), but TortoiseGit is using my Cygwin's git module directly, therefore the agent doesn't get started. 使用bash时,我可以使用我的远程存储库(因为我是在打开bash控制台后立即启动ssh-pageant的),但是TortoiseGit直接使用了Cygwin的git模块,因此该代理无法启动。

Eg shown error when working with TortoiseGit pull command: 例如,在使用TortoiseGit pull命令时显示错误:

Permission denied (publickey). 权限被拒绝(公钥)。
fatal: Could not read from remote repository. 致命:无法从远程存储库读取。
Please make sure you have the correct access rights and the repository exists. 请确保您具有正确的访问权限,并且存储库存在。

How to fix that? 如何解决?

When TortoiseGit is used in combination with cygwin (ie, the cygwin hack is enabled), TortoiseGit pipes all git command through bash. 当TortoiseGit与cygwin结合使用时(即,启用了cygwin hack),TortoiseGit通过bash传递所有git命令。

You could try to add ssh-pageant to .bashrc or .bash_profile , so that it should be called automatically when bash is executed. 您可以尝试将ssh-pageant添加到.bashrc.bash_profile ,以便在执行bash时应自动调用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM