如何在Colab上克隆共享的私人git仓库?

我无法使用colab克隆在Github上与我共享的Git私有存储库。我已经尝试过这些:

!git clone https://<my_username>:<my_password>@github.com/<shared_private_repo_username>/<private_repo>.git
!git clone https://<my_username>:<my_password>@github.com/<my_username>/<private_repo>.git

我得到了错误:

remote: Invalid username or password.
fatal: Authentication failed for <url_used>

我克隆了自己的存储库进行检查,并且可以正常工作。

如何访问共享存储库中的文件?

zhanglin711 回答:如何在Colab上克隆共享的私人git仓库?

请确保您没有2FA activated:必须使用PAT (Personal Access Token)代替密码。
如果它属于您的个人存储库,那么这应该不是问题。

也尝试使用SSH URL

git clone git@github.com:<shared_private_repo_username>/<private_repo>.git

假设您的GitHub帐户上有configured SSH

本文链接:https://www.f2er.com/3148259.html

大家都在问