[Git --- 3] git克隆github上的私有仓库

    技术2023-10-02  73

    一. 背景

    对于私有仓库,不能直接用命令clone下来,直接使用以下命令  

    git clone https://github.com/username/repo_name.git

    会出现以下报错

    remote: Repository not found.

    二. 解决方案

    在命令中加入用户名和密码,即可克隆仓库,命令如下

    git clone https://username:password@github.com/username/repo_name.git

     

    Processed: 0.011, SQL: 9