Github In Ubuntu |work| May 2026
git config --global user.name "Your GitHub Username" git config --global user.email "your-email@example.com" Use the same email attached to your GitHub account. Check your configuration:
cat ~/.ssh/id_ed25519.pub Test the connection:
git config --list You have three good options. Choose one . Option A: GitHub CLI (recommended) Install GitHub CLI: github in ubuntu
git add README.md git commit -m "Add README" git push origin main If you use a token or SSH, the push will succeed immediately. Step 5: Keep Your Local Repository Updated Pull the latest changes from GitHub:
sudo apt update sudo apt install git -y Verify the installation: git config --global user
echo "# My Ubuntu Project" > README.md Stage and commit:
git config --global credential.helper cache git config --global init.defaultBranch main Automate with GitHub Actions (from Ubuntu) Create .github/workflows/test.yml in your repo: Option A: GitHub CLI (recommended) Install GitHub CLI:
git --version # Example output: git version 2.34.1 Link Git to your GitHub account locally: