我怎样才能克隆一个私人的Gitlab回购? [英] How can I clone a private Gitlab repo?
本文介绍了我怎样才能克隆一个私人的Gitlab回购?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我这样做时:
git clone https://example.com/root/test.git
git clone https://example.com/root/test.git
我得到这个错误
fatal: HTTP request failed
当我使用SSH时:
git clone username git@example.com:root/test.git
我得到这个错误:
I am getting this error:
Initialized empty Git repository in /server/user/git@example.com:root/test.git/.git/
fatal: 'user' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
这是一个私人存储库,我添加了我的ssh密钥。
It's a private repository and I have added my ssh keys.
推荐答案
你有你的ssh clone
语句错误 git clone username git @ example。 com:root / test.git
,该语句会尝试将名为 username
的存储库克隆到位置n相对于您当前的路径 git@example.com:root / test.git
you have your ssh clone
statement wrong git clone username git@example.com:root/test.git
, that statement would try to clone a repository named username
into the location relative to your current path git@example.com:root/test.git
您想省略用户名
:
git clone git@example.com:root/test.git
这篇关于我怎样才能克隆一个私人的Gitlab回购?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文