小编Wil*_*ill的帖子

为什么当git clone ssh:// user @ server不能使用git clone user @ server?

我是git的新手.我已在具有SSH访问权限的服务器上创建了一个裸存储库.如果我尝试将其克隆到我的工作站上,我会得到两个不同的结果:

% git clone ssh://me@example.com:git/foo.git

Cloning into 'foo'...
ssh: example.com:git: no address associated with name
fatal: Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)

但如果我删除它ssh://,它工作正常:

% git clone me@example.com:git/foo.git
Run Code Online (Sandbox Code Playgroud)

根据Pro Git的书,这些应该是相同的.

是什么赋予了?

git ssh

2
推荐指数
1
解决办法
2127
查看次数

标签 统计

git ×1

ssh ×1