首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在windows中克隆在ubuntu中创建的gitolite repo

无法在windows中克隆在ubuntu中创建的gitolite repo
EN

Stack Overflow用户
提问于 2015-11-18 11:45:37
回答 1查看 98关注 0票数 1

我按照下面链接中提到的步骤,在我的ubuntu服务器上创建了一个gitolite repo。

http://www.bigfastblog.com/gitolite-installation-step-by-step

在我的ubuntu客户端上,我可以通过在~/.ssh/conf中提供必要的信息来克隆存储库

在windows中,我再次创建了类似ubuntu的.ssh/conf.ssh/conf如下所示:

代码语言:javascript
复制
 Host gitbox
 User gitolite
 Hostname 10.47.52.185
 Port 22
 IdentityFile C:\Users\AY\.ssh\anish

现在,当我尝试克隆时,它会给我以下错误:

代码语言:javascript
复制
 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?

EN

回答 1

Stack Overflow用户

发布于 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,如下所示

代码语言:javascript
复制
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.pubanish (私钥)

OP anish确认in the comments

终于可以克隆了:HOME环境变量有问题。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33771467

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档