首页 > 解决方案 > 为什么 Gitolite 在克隆时给出“无效的仓库名称”?

问题描述

我正在尝试从运行 Gitolite 的服务器克隆一个 repo,但它给了我一个错误:

$ git clone ssh://git@git.example.com:1234/users/me/foo
Cloning into 'foo'...
FATAL: invalid repo name: 'users/me/foo'
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

但是,我知道回购存在,因为ssh -p 1234 git@git.example.com info给出:

hello me, this is git@git.example.com running gitolite3 v3.6-16-g4fefd3f on git 1.7.10.4

 R W    users/me/foo

我什至从该输出中复制/粘贴了 repo 的名称,所以我知道我没有拼错它。

我正在 Windows 8 上的 Git Bash 中执行此操作。

为什么会发生这种情况,我该如何解决?

标签: gitgit-bashgitolitenon-printing-characters

解决方案


看起来我又被非打印字符击中了

正如在我的问题中可以检测到的,在 之前有一些非打印字符(我无法识别)users,这会导致错误。

删除它后,我能够成功克隆 repo。


推荐阅读