Colaboratory - 从 github 访问私有存储库

Mar*_*lli 3 github jupyter-notebook google-colaboratory

在合作实验室我可以用“!”执行bash命令 simbol 就像 bash !git clone repository-name 克隆 github 存储库一样。

当存储库是公共的时,它可以完美工作,但当存储库是私有的时,它就不起作用,因为它请求用户名/密码而不需要输入。我该如何解决这个问题?

万分感谢!

sau*_*hts 5

您可以从 url 本身传递用户名和密码:-

!git clone https://username:password@github.com/username/repository.git
Run Code Online (Sandbox Code Playgroud)