Share private GitHub repositories without adding collaborators. Generate shareable links that give read-only access to your private repos.
Live Demo: https://privategithub.link
- navigates to
https://share-github.com/{owner}/{repo}for repo - see pro tip
- Instant Sharing - Generate a shareable link in seconds
- No Collaborator Access - Share code without granting write access
- Syntax Highlighting - Beautiful code viewing for 100+ languages
- Full Navigation - Browse directories, view files, switch branches
- Branch Access - Share specific branches
- Dark/Light Mode - Automatic theme detection with manual toggle
People have been asking GitHub for this feature for years (#23128, #44506). The ability to share read-only access to a private repository—without adding collaborators—remains highly requested but unimplemented.
Common use cases:
- Share code with clients for review
- Let contractors browse a codebase before starting work
- Show code during technical interviews
- Link to private code from internal documentation
This tool fills that gap with a simple shareable URL - no GitHub invitations required.
Pro Tip: Prepend share- to any GitHub URL to instantly open it in the app:
github.com/owner/repo → share-github.com/owner/repo
Don't want to trust a third party with your access token? Self-host your own instance.
- Bun (or Node.js 18+)
# Clone the repository
git clone https://github.com/thejasonxie/private-github-link.git
cd private-github-link
# Install dependencies
bun install
# Start development server
bun run devThe app will be available at http://localhost:3000.
No environment variables are required for basic functionality. The app uses client-side GitHub API calls with user-provided tokens.
Optional variables for production:
# Sentry error tracking (optional)
VITE_SENTRY_DSN=your_sentry_dsn
# PostHog analytics (optional)
VITE_POSTHOG_KEY=your_posthog_key# Build for production
bun run build
# Preview production build
bun run preview- User enters a GitHub repository URL and personal access token
- The app generates a shareable URL with the token embedded
- Recipients can browse the repo using the GitHub API
- All API calls happen client-side - no server stores your token
Security Note: The access token is embedded in the URL. Only share links with people you trust. Use fine-grained tokens with minimal permissions (read-only access to specific repos).
bun run dev # Start development server
bun run build # Build for production
bun run preview # Preview production build
bun run test # Run tests
bun run test:watch # Run tests in watch mode
bun run test:coverage # Run tests with coverage
bun run lint # Lint code
bun run format # Format code
bun run check # Lint + format checkThis project uses Vitest with Testing Library and MSW for API mocking.
# Run all tests
bun run test
# Run with coverage
bun run test:coverage
# Run specific test file
bun run test -- src/lib/utils.test.tsSee TESTING.md for more details on the testing setup.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details.
Created by @thejasonxie