使用FreeSSHd在Windows下的Git服务器

时间:2013-03-15 10:18:13

标签: windows git ssh

我正在尝试在Windows上将git设置为服务器。

  1. 安装了freesshd,配置了它,并从linux机器上检查了ssh,它可以工作。
  2. 下载Git for Windows,并安装它,在PATH中添加了git \ bin和git \ libexec \ git-core
  3. 在d:\ GitRepo \ u7.git
  4. 中创建裸存储库

    我正在尝试

    git clone serhiy@192.168.75.2:d:/gitrepo/u7.git
    

    我知道“线条长度不好的字符:fata”。

    但输入

    ssh 192.168.75.2 git-receive-pack d:/gitrepo/u7.git
    

    我有合法的答案

      

    00900000000000000000000000000000000000000000能力^ {}报告状态delete-refs side-band-64k quiet ofs-delta agent = git / 1.8.1.msysgit.1   0000

    有什么不对? 据我所知,我无法在“git clone”时找到正确的文件夹,我尝试了ssh://,sh.exe而不是cmd.exe,试过cmd / K“d:&& cd \ gitrepo”то设置当前文件夹,什么都没有。但我有工作git-receive-pack d:/gitrepo/u7.git。 我是否需要为存储库指向当前文件夹?

    更新 阅读this topic中的最后一篇文章后,我创建了指向文件和克隆项目

    使用行

    创建文件gup.sh
      

    git-upload-pack.exe $ *

    和grp.sh with

      

    git-receive-pack.exe $ *

    在服务器上!

    然后克隆存储库

    git clone -u 'sh gup.sh' ssh://serhiy@192.168.75.2/d/gitrepo/u7.git
    

    并设置一些配置

    git config --global remote.origin.uploadpack 'sh gup.sh'
    git config --global remote.origin.receivepack 'sh grp.sh'
    

    它似乎在linux下运行。 在Windows下,我不能只登录,拒绝Permession。

    更新 由于我已经开始使用RSA密钥,所以一切正常 我有:

    1. Windows Server 2003
    2. 安装了FreeSHHd
    3. 使用RSA身份验证从Linux和Windows计算机访问Git存储库。
    4. 作为服务器上的shell,我使用git的sh.exe
    5. 第一次克隆存储库的一种奇怪的方法git clone -u'sh gup.sh'ssh://192.168.75.2/d/gitrepo/u7.git

0 个答案:

没有答案