windows – Bitvise SSH Git初始目录

前端之家收集整理的这篇文章主要介绍了windows – Bitvise SSH Git初始目录前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在 Windows机器上使用Bitvise SSH服务器,我想创建不同的虚拟用户帐户来贡献git存储库. ( Git push将使用ssh执行).

所以例如我可以使用

git clone ssh://mydomain.eu/d/gitrepos/username/repository_name

在客户端的cmd shell中,它工作得很好但有些不完美,因为每个人都可以访问所有存储库,所以一直都是浏览.

Thatswhy我想设置一个初始的shell目录,我已经覆盖了“初始终端shell目录”选项:

"D:\Gitrepos\username"

在bitvise ssh中的虚拟帐户设置中.

当我使用它进行测试时,这似乎可以在第一眼看到

ssh username@mydomain.eu

并在终端位置输入密码Im:

D:\Gitrepos\username>

就像我想要的那样.

现在的问题是:

当我尝试从初始目录使用git时:

git clone ssh://kratos@tibiafun.eu/repository_name

因为我应该已经在正确的子目录中它告诉我:

"fatal: 'D:/Programs/Git/repository_name' does not appear to be a git repository"

哪个是错的! “D:/ Programs / Git”当然是我的git安装的路径,我不知道为什么它会重定向我,它甚至不是git.exe所在的/ bin目录.

我忘了提到我正在使用:

>操作系统:Windows Server 2008 R2
> Git:msysgit 1.9.2

任何人都知道为什么会这样,如果有可能如何防止这种情况?

谢谢!…

解决方法

尝试运行以下命令:

git daemon --base-path=D:/Gitrepos --export-all --enable=receive-pack

Unix样式目录分隔符是有意的.

猜你在找的Windows相关文章