我正在努力让它发挥作用:
使用 NBGit 从 ssh 服务器克隆 git 项目。我安装了 NBGit,在本地运行良好,但是当给出连接参数时,我不确定正确的 URL 是什么。
或者目前不支持?
NBGit 0.4 适用于 Win7 上的 NB 6.9.1
最佳答案
网址应该是:
git@myserver:/myreppo
但正如issue 91中报道的那样,这可能效果不太好。
我将探索 issue 56 中提出的解决方法:
在 ~/.ssh 目录中,创建一个“config”文件
在文本编辑器中打开 ~/.ssh/config 并输入以下内容:
Host AHostName -- this will be the name you will be calling in nbgit
User gituser
Hostname SSH IP address --eg 192.68.24.1 --my git server
Port 1234 -- use this if you need custom ports
IdentityFile "path to your private ssh key"
从那里,网址可以是:
AHostName:myrepo
关于java - 使用 ssh NBGit 到远程主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5357232/