Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git克隆专用github存储库_Git_Github - Fatal编程技术网

Git克隆专用github存储库

Git克隆专用github存储库,git,github,Git,Github,我想将专用github存储库克隆到另一个设备。在另一个问题中,答案是添加用户名和密码,如下所示: git clone 'https://username:password/github.com/username/repo/' 但是,对我来说,这会导致以下错误: fatal. unable to access 'https://name:password/github.com/username/repo/': URL using bad/illegal format or missing URL

我想将专用github存储库克隆到另一个设备。在另一个问题中,答案是添加用户名和密码,如下所示:

git clone 'https://username:password/github.com/username/repo/'
但是,对我来说,这会导致以下错误:

fatal. unable to access 'https://name:password/github.com/username/repo/': URL using bad/illegal format or missing URL
我做错了什么?我希望你们都能帮助我。谢谢大家!

编辑:
我将问题标记为重复,建议的问题解决了我的问题。

试试看git@github.com而不是https://

如果仍然不起作用,请遵循下面的说明

以下步骤应该有效

  • 在git hub中创建访问令牌
  • git克隆
  • 输入您的用户名并使用访问令牌作为密码

  • 注意
    @
    (不是
    /
    ),在上面的链接问题中,提供凭证的方式也有很多种。祝你好运非常感谢。我试试看。我看了很多不同的问题,但没有一个对我有帮助。很抱歉问了一个重复的问题,我没有看到这个问题。Jannik没关系,我已经为我的同事将其添加到书签中:)谢谢,我的问题评论中的建议已经足够了,只需替换/为@did it for me!