使用git clone进行无效身份验证

时间:2015-07-15 18:02:51

标签: git github clone credentials

我正在尝试克隆一个不在我的github帐户上的私人仓库,但我确实可以访问。 我使用的命令是

 git clone https://username:passwordgit@github.com/path/to/repo.git
 git clone https://username:password@github.com/path/to/repo.git

我的用户名或密码无效,但如果我这样做

git clone https://github.com/path/to/repo.git 

输入相同的用户名和密码,工作正常。什么是正确的语法?

1 个答案:

答案 0 :(得分:0)

git clone https://username:password@github.com/path/to/repo.git

这是正确的语法。也许你输错了凭据。你可以在这里参考这个question

相关问题