This guide explains how to use nbgitpuller to pull notebooks and files from private GitHub repositories on DataHub. This feature is useful when you need to distribute private course materials and proprietary datasets to students.
Overview¶
DataHub supports pulling from private GitHub repositories through GitHub Apps with specific configurations. This allows instructors to:
Distribute course materials from private repositories securely
Share proprietary datasets with enrolled students
Create nbgitpuller links for private repositories
Available GitHub Apps¶
DataHub has several GitHub Apps configured for private repository access. These apps have titles containing “private repos” and can be found in the berkeley-dsep-infra organization settings.
Each DataHub instance may have its own dedicated GitHub App for private repository access:
Prerequisites¶
Before you can pull notebooks from a private repository, ensure that:
Hub Support: Your DataHub instance supports private repository pulling (contact DataHub administrators to confirm)
GitHub App Permission: A DataHub administrator has granted the appropriate GitHub App access to your repository
Getting Permission for Private Repository Access¶
To request access:
Contact DataHub Support: Reach out to the Berkeley DataHub team through your usual support channels
Provide Repository Details: Include the following information:
Full repository URL (e.g.,
https://github.com/your-org/private-repo)DataHub instance you’ll be using (main DataHub, dev, or specific course hub)
Course information and justification for private access
Wait for Configuration: The administrator will configure the GitHub App to access your repository
Administrator Process¶
For DataHub administrators, the process involves:
Identifying the correct GitHub App for the target DataHub instance
Installing the app in the organization containing the private repository
Granting the app access specifically to the requested repository
Verifying the configuration works with a test pull
Troubleshooting¶
Common Issues¶
Link doesn’t work / Access denied
Verify the GitHub App has been granted access to your repository
Check that you’re using the correct DataHub URL for your instance
Ensure the repository URL is correct and accessible
Example Workflow¶
Here’s a typical workflow for using private repositories:
Prepare Repository: Create or organize your private GitHub repository with course materials
Request Access: Contact DataHub administrators to grant GitHub App access
Wait for Confirmation: Administrator confirms the configuration is complete
Create Links: Generate nbgitpuller links using your preferred method
Test Access: Verify the links work by testing them yourself