{"id":22294850,"url":"https://github.com/tsunrise/colab-github","last_synced_at":"2025-10-13T22:31:18.332Z","repository":{"id":109091300,"uuid":"587074881","full_name":"tsunrise/colab-github","owner":"tsunrise","description":"Authenticate with GitHub in Google Colab to access private repo.","archived":false,"fork":false,"pushed_at":"2023-01-09T23:49:03.000Z","size":11,"stargazers_count":28,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-03T17:48:41.611Z","etag":null,"topics":["colab-notebook","git","github","google-colab"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsunrise.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-09T22:33:39.000Z","updated_at":"2024-11-22T11:48:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9e6c384-3dd7-4198-a15a-a0f658adb3c2","html_url":"https://github.com/tsunrise/colab-github","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsunrise%2Fcolab-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsunrise%2Fcolab-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsunrise%2Fcolab-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsunrise%2Fcolab-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsunrise","download_url":"https://codeload.github.com/tsunrise/colab-github/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236411108,"owners_count":19144608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colab-notebook","git","github","google-colab"],"created_at":"2024-12-03T17:39:14.249Z","updated_at":"2025-10-13T22:31:13.044Z","avatar_url":"https://github.com/tsunrise.png","language":"Python","readme":"# Access GitHub Private Repo in Google Colab\n\u003ca target=\"_blank\" href=\"https://colab.research.google.com/github/tsunrise/colab-github/blob/main/Access_GitHub_Private_Repo.ipynb\"\u003e\n  \u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\n\u003c/a\u003e\n\nAuthenticate with GitHub in Google Colab to access private repo.\n\n## Steps\n- Run the following code inside the colab notebook.\n```python\n!wget -q https://raw.githubusercontent.com/tsunrise/colab-github/main/colab_github.py\nimport colab_github\ncolab_github.github_auth(persistent_key=True)\n```\nNote that by setting `persistent_key` to true, you will be asked to connect to Google Drive, so this script will store private key inside your `.colab-github` folder of your Google Drive. Doing so, you only need to upload your private key to Github once.\n\n- You will see outputs like:\n```\nPlease go to https://github.com/settings/ssh/new to upload the following key:  \nssh-ed25519 xxxxxxx/xxxxxxxxxxxxxxxxxxxx root@xxxxxxxxxxxxxxxx\n```\nUpload this public key to either your [SSH settings](https://github.com/settings/ssh/new), or your repo's Deploy Keys.\n\n- Use **SSH** method to clone your private repo. Inside the notebook, you can run\n```python\n!git clone git@github.com:\u003cyour_username\u003e/\u003cyour_private_repo\u003e.git\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsunrise%2Fcolab-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsunrise%2Fcolab-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsunrise%2Fcolab-github/lists"}