gh repo create my-project gh issue list --repo cli/cli gh pr checkout 123 This stores your GitHub token securely so you don't need to re-enter passwords for git push :
sudo apt update sudo apt install git -y Verify installation: github ubuntu install
git --version git config --global user.name "Your Name" git config --global user.email "your_email@example.com" 2. Install GitHub CLI ( gh ) GitHub CLI allows you to create repos, manage issues, review PRs, and run GitHub Actions workflows without leaving the terminal. Option A: Install via Official GitHub APT Repository (recommended) # Install required tools sudo apt install curl -y Add GitHub CLI's official repository key and source curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null Update and install gh sudo apt update sudo apt install gh -y Option B: Install via Snap (simpler, but may be slightly behind) sudo snap install gh Verify installation gh --version 3. Authenticate GitHub CLI After installing gh , authenticate with your GitHub account: gh repo create my-project gh issue list --repo
gh auth setup-git gh repo clone octocat/Hello-World cd Hello-World git status Summary table | Tool | Install command(s) | Verify | |------|-------------------|--------| | Git | sudo apt install git | git --version | | GitHub CLI | curl + apt (official) or snap install gh | gh --version | Troubleshooting git: command not found Re-run: sudo apt install git Authenticate GitHub CLI After installing gh , authenticate
when pushing to GitHub Run gh auth setup-git or manually add your SSH key.