我知道如何为HTTPS请求提供用户名和密码,如下所示:
git clone https://username:password@remote
Run Code Online (Sandbox Code Playgroud)
但我想知道如何为遥控器提供用户名和密码,如下所示:
git clone git@remote.git
Run Code Online (Sandbox Code Playgroud)
我试过这样的:
git clone username:password@git@remote.git
git clone git@username:password@remote.git
git clone git@remote.git@username:password
Run Code Online (Sandbox Code Playgroud)
但他们没有奏效.
当你在一个新目录或者一个现有目录中执行时git init,Git会创建一个.git目录,几乎所有Git存储和操作的内容都位于该目录中。
如果要备份或者复制一个库,基本上就是把这个目录复制到其他地方。
现在,我只想.git从 GitHub 下载目录包含内容:
.git使用request通过Python语言下载文件。(我不想通过 git long 命令)如何从 GitHub 或我的私有 gitlib 找到 .git 目录以及如何下载它?