Working in a corporate environment often means using private repositories hosted on GitHub Enterprise. If you're on a Mac and prefer the Terminal, here’s a simple step-by-step guide to clone the repo and get started with VS Code.
which git
git --versionIf not installed, install it using:
brew install gitGitHub currently supports two types of PATs:
Classic
Fine-Grained
I used the Classic Token because it is recommended when you're working with GitHub Enterprise Server and the fine-grained token is still in the beta phase.
You can generate PATs at GitHub → Settings → Developer Settings → Personal Access Tokens.
brew install uvwhich git
git --versionIn VS Code:
Press Cmd + Shift + X (or click Extensions)
Search and install GitHub Repositories by GitHub
git clone https://github.company.com/your-team/your-repo.git
When prompted,
enter your GitHub username
your Personal Access Token instead of a password.
I initially tried using VS Code directly to clone the repository, but it proved not be too straight forward for GitHub Enterprise with custom domains. Using the terminal proved to be much easier and quicker for me.
cd your-repocode .If code is not recognized:
Open VS Code
Press Cmd + Shift + P
Run: Shell Command: Install 'code' command in PATH
If you're working on a Python project, consider installing the following VS Code extensions:
If your project includes a pyproject.toml, you can install dependencies using uv:
uv syncCloning a private repository from GitHub Enterprise on a Mac can be smooth and efficient with the right setup. By using the Terminal alongside VS Code, you avoid the complexities that sometimes arise with GitHub Enterprise's custom domains in the GUI. This guide walks you through the essentials—setting up Git, generating a Personal Access Token (especially using the Classic token for GitHub Enterprise), and configuring your environment with useful tools like uv and Python extensions. Once everything is in place, working on your codebase in VS Code becomes fast and seamless.