【问题标题】:NBGit to remote host with sshNBGit 通过 ssh 连接到远程主机
【发布时间】:2011-03-18 20:00:45
【问题描述】:

我正在努力让它发挥作用:

使用 NBGit 从 ssh 服务器克隆一个 git 项目。我安装了 NBGit,在本地运行良好,但是当给出连接参数时,我不确定什么是正确的 URL。

或者目前不支持?

NBGit 0.4 用于 Win7 上的 NB 6.9.1

【问题讨论】:

    标签: java git netbeans-6.9 netbeans-plugins


    【解决方案1】:

    网址应该是:

    git@myserver:/myreppo
    

    但正如issue 91 中所报告的那样,这可能效果不佳。
    我将探索issue 56 中提出的解决方法:

    在您的 ~/.ssh 目录中,创建一个“配置”文件

    在文本编辑器中打开 ~/.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
    

    【讨论】:

    • @PeterMmm:这也适用于 Windows7:定义一个 HOME 变量并使其引用您想要的任何目录。然后启动 Netbeans,确保首先定义了 HOME。您的配置文件将位于%HOME%/.ssh/config(或尝试%HOME%/_ssh/config
    猜你喜欢
    • 1970-01-01
    • 2020-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多