如何将 GitHub 存储库链接到 Google Colab 笔记本?

mon*_*_qk 7 git git-clone google-colaboratory

我已经创建了一个 GitHub 存储库,并且想将其链接到我的 Colab 笔记本,但我无法做到这一点。我使用以下命令来获取 git repo 的克隆:

! git clone link/to/your/repo
Run Code Online (Sandbox Code Playgroud)

但我收到这个错误:

fatal: repository 'link/to/your/repo' does not exist
Run Code Online (Sandbox Code Playgroud)

有人可以指出我的错误吗?谢谢!

Cya*_*yan 7

当您在 Colab 网站中使用时:

您只需访问Google Colab,然后在您访问 Colab 站点并登录时即可看到的框中选择“GitHub”。Colab 会自动将您重定向到 github 以授权您的 github 帐户。然后您可以选择在 Google Colab 中使用的存储库!

当您在本地 CLI 中使用时:

您需要检查您在命令中提供的 URL。它必须是有效的 git(hub) url。