简体   繁体   English

Windows上的Git:用于GIT-Bash环境的页面存储在哪里

[英]Git on Windows: Where is pageant stored for GIT-Bash environment

Starting with GIT, I set the plink-path (which is set via the GIT-installation process) to the GIT_SSH environment variable. 从GIT开始,我将plink-path(通过GIT安装过程设置)设置为GIT_SSH环境变量。

Later then I reinstalled PuTTY again and by this the path moved to the default place (C:\\Program Files\\PuTTY). 之后,我再次重新安装了PuTTY,并由此将路径移动到了默认位置(C:\\ Program Files \\ PuTTY)。 This works fine with the Windows-command shell but not with the GIT Bash. 这在Windows命令外壳程序上运行良好,但在GIT Bash上则无法运行。 GIT Bash still looks for it at the old place. GIT Bash仍然在老地方寻找它。

I wonder now where the BASH has stored this and how I might change it. 我现在不知道BASH存放在哪里以及如何更改它。

This is what I get from BASH: 这是我从BASH中得到的:

$ git clone <user>@<server>:<repository-path> 
Cloning into 'devtools'... 
error: cannot spawn <oldPuttyPath>\plink.exe: Invalid argument 
fatal: unable to fork

You can add the path to plink.exe in the ~/.bashrc file : 您可以在~/.bashrc文件中将路径添加到plink.exe

export GIT_SSH='/c/Program Files/.../putty/plink.exe'

To reload the configuration, run source ~/.bashrc . 要重新加载配置,请运行source ~/.bashrc

Today it's gone. 今天不见了。 Seems to be a cache problem. 似乎是缓存问题。 Reboot solved it, git clone if fine now 重新启动解决它,git clone如果现在可以了

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

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