我按照下面链接中提到的步骤,在我的ubuntu服务器上创建了一个gitolite repo。
http://www.bigfastblog.com/gitolite-installation-step-by-step
在我的ubuntu客户端上,我可以通过在~/.ssh/conf中提供必要的信息来克隆存储库
在windows中,我再次创建了类似ubuntu的.ssh/conf,.ssh/conf如下所示:
Host gitbox
User gitolite
Hostname 10.47.52.185
Port 22
IdentityFile C:\Users\AY\.ssh\anish现在,当我尝试克隆时,它会给我以下错误:
git clone gitbox:gitolite-admin
Cloning into 'gitolite-admin'...
ssh: Could not resolve hostname gitbox: no address associated with name
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.我猜.ssh/conf没有任何效果。
如何在windows中克隆一个repo repo?
发布于 2015-11-18 13:22:04
很简单:当给定别名时,ssh将查找%HOME%/.ssg/config。
比如"config",而不是"conf“。
确保(对C:\Users\AY)定义了HOME。并且您的ssh配置文件名为"config“。
还要测试ssh -i C:\Users\AY\.ssh\anish -T gitolite@10.47.52.185是否正常工作。
此外,OP anish还提到了in the comments
我已经使用了ubuntu的
gitolite.pub,我在windows中创建了anish.pub,并将其添加到gitolite中,并更改了conf/gitolite.conf,如下所示
gitolite-admin RW+ = gitolite
repo testing
RW+ = @all
repo bigfastblog
RW+ = anish 确保将该gitolite.conf推送回Ubuntu服务器,并检查~gitolite/.ssh/authorized_keys是否列出了anish.pub内容。
此外,Windows HOME/.ssh还应包含anish.pub和anish (私钥)
终于可以克隆了:
HOME环境变量有问题。
https://stackoverflow.com/questions/33771467
复制相似问题