{
  "schemaVersion": "1.0",
  "item": {
    "slug": "github-passwordless-setup",
    "name": "GitHub Passwordless Setup",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/happydog-intj/github-passwordless-setup",
    "canonicalUrl": "https://clawhub.ai/happydog-intj/github-passwordless-setup",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/github-passwordless-setup",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=github-passwordless-setup",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "README.zh-CN.md",
      "SKILL.md",
      "setup.sh",
      "verify.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "github-passwordless-setup",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T17:52:42.240Z",
      "expiresAt": "2026-05-10T17:52:42.240Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=github-passwordless-setup",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=github-passwordless-setup",
        "contentDisposition": "attachment; filename=\"github-passwordless-setup-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "github-passwordless-setup"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/github-passwordless-setup"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/github-passwordless-setup",
    "agentPageUrl": "https://openagent3.xyz/skills/github-passwordless-setup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/github-passwordless-setup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/github-passwordless-setup/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "GitHub Passwordless Setup",
        "body": "Complete guide to setting up passwordless authentication for GitHub using SSH keys and Personal Access Tokens (PAT). Once configured, you'll never need to enter passwords for Git operations or GitHub CLI commands.\n\nVerified Working:\n\n✅ macOS 10.15+ (tested on 14.4)\n✅ Linux (Ubuntu, Debian, Fedora, Arch)\n✅ Windows (WSL2, Git Bash)"
      },
      {
        "title": "🎯 What This Solves",
        "body": "Before:\n\n❌ Type password every time you push/pull\n❌ GitHub CLI requires re-authentication\n❌ Tokens expire and break workflows\n❌ HTTPS URLs need credentials repeatedly\n\nAfter:\n\n✅ Zero-password Git operations (push/pull/clone)\n✅ Zero-password repository creation\n✅ Zero-password issue/PR management\n✅ Persistent authentication (no expiration)"
      },
      {
        "title": "🚀 Quick Setup",
        "body": "One-line automated setup:\n\ncurl -fsSL https://raw.githubusercontent.com/happydog-intj/github-passwordless-setup/master/setup.sh | bash\n\nOr follow the manual steps below."
      },
      {
        "title": "Part 1: SSH Key Configuration",
        "body": "SSH keys enable password-free Git operations (push/pull/clone).\n\nStep 1: Check for Existing SSH Keys\n\nls -la ~/.ssh/*.pub\n\nIf you see id_ed25519.pub or id_rsa.pub, you already have a key. Skip to Step 3.\n\nStep 2: Generate New SSH Key\n\nRecommended: ED25519 (most secure)\n\nssh-keygen -t ed25519 -C \"your-email@example.com\"\n\nOr RSA (if ED25519 not supported):\n\nssh-keygen -t rsa -b 4096 -C \"your-email@example.com\"\n\nDuring generation:\n\nPress Enter for default location (~/.ssh/id_ed25519)\nEnter passphrase (optional but recommended)\nmacOS will save passphrase to Keychain\n\nStep 3: Copy Public Key\n\n# macOS\ncat ~/.ssh/id_ed25519.pub | pbcopy\n\n# Linux (xclip)\ncat ~/.ssh/id_ed25519.pub | xclip -selection clipboard\n\n# Linux (xsel)\ncat ~/.ssh/id_ed25519.pub | xsel --clipboard\n\n# Or just display and copy manually\ncat ~/.ssh/id_ed25519.pub\n\nStep 4: Add Key to GitHub\n\nVisit: https://github.com/settings/ssh/new\nTitle: Your Computer Name (macOS/Linux)\nKey type: Authentication Key\nKey: Paste your public key\nClick Add SSH key\n\nStep 5: Test SSH Connection\n\nssh -T git@github.com\n\nExpected output:\n\nHi username! You've successfully authenticated, but GitHub does not provide shell access."
      },
      {
        "title": "Part 2: GitHub Personal Access Token",
        "body": "PAT enables password-free GitHub CLI operations (create repos, manage issues/PRs).\n\nStep 1: Generate Token\n\nVisit: https://github.com/settings/tokens/new\n\nConfiguration:\n\nNote: OpenClaw CLI Token (or any description)\nExpiration: No expiration (or 90 days)\nSelect scopes:\n\n✅ repo (all sub-scopes)\n✅ workflow (if using GitHub Actions)\n✅ delete_repo (if you need to delete repositories)\n✅ admin:org (if managing organizations)\n\nClick Generate token and copy it immediately (shown only once!).\n\nFormat: ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\nStep 2: Install GitHub CLI\n\nmacOS:\n\nbrew install gh\n\nLinux (Debian/Ubuntu):\n\ntype -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)\ncurl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg\nsudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg\necho \"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\nsudo apt update\nsudo apt install gh -y\n\nOther Linux:\nSee: https://github.com/cli/cli/blob/trunk/docs/install_linux.md\n\nStep 3: Configure Token\n\n# Method 1: Interactive (paste when prompted)\ngh auth login --with-token\n# Then paste your token and press Enter\n\n# Method 2: One-line (replace YOUR_TOKEN)\necho \"ghp_YOUR_TOKEN_HERE\" | gh auth login --with-token\n\nStep 4: Set Git Protocol to SSH\n\ngh config set git_protocol ssh\n\nThis ensures gh commands use SSH (not HTTPS) for Git operations."
      },
      {
        "title": "Part 3: Verification",
        "body": "Verify SSH Configuration\n\n# Test SSH connection\nssh -T git@github.com\n\n# Expected: Hi username! You've successfully authenticated...\n\nVerify GitHub CLI\n\n# Check authentication status\ngh auth status\n\n# Expected: ✓ Logged in to github.com account username\n\n# Test API access\ngh api user --jq '.login'\n\n# Expected: your-username\n\nVerify Complete Workflow\n\n# Test creating a repository (will create and delete)\ngh repo create test-auth-$(date +%s) --public --description \"Test\" \\\n  && echo \"✅ Create: SUCCESS\" \\\n  && gh repo delete $(gh repo list --limit 1 --json name --jq '.[0].name') --yes \\\n  && echo \"✅ Delete: SUCCESS\"\n\nAll operations should complete without prompting for passwords."
      },
      {
        "title": "🔄 Convert Existing Repos to SSH",
        "body": "If you have existing repositories using HTTPS URLs:\n\n# Check current remote\ngit remote -v\n\n# If it shows https://github.com/...\n# Convert to SSH\ngit remote set-url origin git@github.com:username/repo.git\n\n# Verify\ngit remote -v\n# Should show: git@github.com:username/repo.git\n\nBatch convert all repos in a directory:\n\nfind . -name \".git\" -type d | while read gitdir; do\n  cd \"$gitdir/..\"\n  if git remote get-url origin 2>/dev/null | grep -q \"https://github.com\"; then\n    REPO=$(git remote get-url origin | sed 's|https://github.com/|git@github.com:|')\n    git remote set-url origin \"$REPO\"\n    echo \"✅ Converted: $(pwd)\"\n  fi\n  cd - > /dev/null\ndone"
      },
      {
        "title": "🛠️ Automated Setup Script",
        "body": "Save this as setup.sh:\n\n#!/bin/bash\nset -e\n\necho \"🔐 GitHub Passwordless Setup\"\necho \"============================\"\necho \"\"\n\n# Check for existing SSH key\nif [ -f ~/.ssh/id_ed25519.pub ]; then\n    echo \"✅ SSH key already exists\"\n    SSH_KEY=$(cat ~/.ssh/id_ed25519.pub)\nelif [ -f ~/.ssh/id_rsa.pub ]; then\n    echo \"✅ SSH key already exists (RSA)\"\n    SSH_KEY=$(cat ~/.ssh/id_rsa.pub)\nelse\n    echo \"📝 Generating new ED25519 SSH key...\"\n    ssh-keygen -t ed25519 -C \"$(whoami)@$(hostname)\" -f ~/.ssh/id_ed25519 -N \"\"\n    SSH_KEY=$(cat ~/.ssh/id_ed25519.pub)\n    echo \"✅ SSH key generated\"\nfi\n\necho \"\"\necho \"🔑 Your public SSH key:\"\necho \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\"\necho \"$SSH_KEY\"\necho \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\"\necho \"\"\necho \"📋 Next steps:\"\necho \"1. Copy the key above\"\necho \"2. Visit: https://github.com/settings/ssh/new\"\necho \"3. Paste the key and save\"\necho \"4. Come back and press Enter to continue\"\nread -p \"Press Enter after adding the key to GitHub...\"\n\n# Test SSH\necho \"\"\necho \"🧪 Testing SSH connection...\"\nif ssh -T git@github.com 2>&1 | grep -q \"successfully authenticated\"; then\n    echo \"✅ SSH authentication successful!\"\nelse\n    echo \"❌ SSH authentication failed. Please check your key on GitHub.\"\n    exit 1\nfi\n\n# Check for GitHub CLI\necho \"\"\nif ! command -v gh &> /dev/null; then\n    echo \"📦 GitHub CLI not found. Install it from:\"\n    echo \"   macOS: brew install gh\"\n    echo \"   Linux: https://github.com/cli/cli/blob/trunk/docs/install_linux.md\"\n    exit 1\nfi\n\n# Configure GitHub CLI\necho \"🎫 Configuring GitHub CLI...\"\necho \"Please enter your GitHub Personal Access Token:\"\necho \"(Visit https://github.com/settings/tokens/new if you don't have one)\"\necho \"\"\ngh auth login --with-token\n\n# Set git protocol to SSH\ngh config set git_protocol ssh\n\n# Verify\necho \"\"\necho \"🔍 Verifying configuration...\"\nif gh auth status &> /dev/null; then\n    echo \"✅ GitHub CLI authenticated\"\n    USERNAME=$(gh api user --jq '.login')\n    echo \"✅ Username: $USERNAME\"\nelse\n    echo \"❌ GitHub CLI authentication failed\"\n    exit 1\nfi\n\necho \"\"\necho \"🎉 Setup complete!\"\necho \"\"\necho \"You can now:\"\necho \"  • Push/pull without passwords: git push\"\necho \"  • Create repos instantly: gh repo create my-project --public\"\necho \"  • Manage issues/PRs: gh issue create, gh pr list\"\necho \"\"\n\nMake it executable and run:\n\nchmod +x setup.sh\n./setup.sh"
      },
      {
        "title": "SSH Issues",
        "body": "Problem: \"Permission denied (publickey)\"\n\n# Check SSH agent\nssh-add -l\n\n# If empty or error, add your key\nssh-add ~/.ssh/id_ed25519\n\n# macOS: Add to Keychain permanently\nssh-add --apple-use-keychain ~/.ssh/id_ed25519\n\nProblem: \"Host key verification failed\"\n\n# Remove old host key\nssh-keygen -R github.com\n\n# Reconnect (will prompt to add new key)\nssh -T git@github.com"
      },
      {
        "title": "GitHub CLI Issues",
        "body": "Problem: \"Requires authentication\"\n\n# Check token validity\ngh auth status\n\n# Re-authenticate\ngh auth logout\ngh auth login --with-token\n\nProblem: \"Token scopes insufficient\"\n\nCreate a new token with broader scopes:\n\nVisit: https://github.com/settings/tokens\nDelete old token\nCreate new with repo, workflow, delete_repo"
      },
      {
        "title": "General Issues",
        "body": "Check Configuration Files:\n\n# SSH config\ncat ~/.ssh/config\n\n# GitHub CLI config\ncat ~/.config/gh/hosts.yml\n\n# Git config\ngit config --global --list"
      },
      {
        "title": "SSH Keys",
        "body": "Use ED25519 (more secure than RSA)\nSet a passphrase (optional but recommended)\nUse ssh-agent (macOS Keychain, gnome-keyring)\nNever share private keys (id_ed25519 - no .pub)\nRevoke compromised keys immediately at https://github.com/settings/keys"
      },
      {
        "title": "Personal Access Tokens",
        "body": "Minimum scopes needed (don't select all)\nSet expiration (90 days for security, or no expiration for convenience)\nRevoke unused tokens at https://github.com/settings/tokens\nNever commit tokens to repositories\nRotate regularly (every 90 days recommended)"
      },
      {
        "title": "SSH Config File",
        "body": "Create ~/.ssh/config for custom settings:\n\nHost github.com\n  HostName github.com\n  User git\n  IdentityFile ~/.ssh/id_ed25519\n  AddKeysToAgent yes\n  UseKeychain yes"
      },
      {
        "title": "Multiple GitHub Accounts",
        "body": "# ~/.ssh/config\nHost github-personal\n  HostName github.com\n  User git\n  IdentityFile ~/.ssh/id_ed25519_personal\n\nHost github-work\n  HostName github.com\n  User git\n  IdentityFile ~/.ssh/id_ed25519_work\n\nClone with specific account:\n\ngit clone git@github-personal:username/repo.git\ngit clone git@github-work:company/repo.git"
      },
      {
        "title": "Git Aliases",
        "body": "Add to ~/.gitconfig:\n\n[alias]\n  pushf = push --force-with-lease\n  undo = reset --soft HEAD~1\n  amend = commit --amend --no-edit\n  sync = !git fetch --all && git pull"
      },
      {
        "title": "🌐 Environment Variables",
        "body": "Optional environment variables for automation:\n\n# GitHub CLI\nexport GH_TOKEN=\"ghp_xxxxx\"  # Auto-auth for gh commands\n\n# Git\nexport GIT_SSH_COMMAND=\"ssh -i ~/.ssh/id_ed25519\"  # Force specific key\n\nAdd to your shell profile (~/.bashrc, ~/.zshrc):\n\n# GitHub CLI auto-auth (optional)\nif [ -f ~/.config/gh/token ]; then\n  export GH_TOKEN=$(cat ~/.config/gh/token)\nfi"
      },
      {
        "title": "Update SSH Key",
        "body": "# Generate new key\nssh-keygen -t ed25519 -C \"new-email@example.com\"\n\n# Add to GitHub\ncat ~/.ssh/id_ed25519.pub | pbcopy\n# Visit: https://github.com/settings/ssh/new\n\n# Update old repos (if using specific key in config)\ngit config core.sshCommand \"ssh -i ~/.ssh/id_ed25519\""
      },
      {
        "title": "Rotate GitHub Token",
        "body": "# Create new token at https://github.com/settings/tokens/new\n# Configure it\necho \"ghp_NEW_TOKEN\" | gh auth login --with-token\n\n# Revoke old token at https://github.com/settings/tokens"
      },
      {
        "title": "📊 Comparison: HTTPS vs SSH",
        "body": "FeatureHTTPSSSHAuthenticationUsername + TokenSSH KeyPassword neededEvery operationNeverSetup complexityLowMediumSecurityGoodExcellentCorporate firewallsUsually allowedSometimes blockedRecommendationBeginnersDaily use"
      },
      {
        "title": "Create New Project",
        "body": "# Create repo and push in one go\ngh repo create my-project --public --source=. --push\n\n# Or step by step\ngh repo create my-project --public\ngit remote add origin git@github.com:username/my-project.git\ngit push -u origin main"
      },
      {
        "title": "Clone Private Repo",
        "body": "# SSH (no password)\ngit clone git@github.com:username/private-repo.git\n\n# Check access\ngh repo view username/private-repo"
      },
      {
        "title": "Manage Issues",
        "body": "# Create issue\ngh issue create --title \"Bug found\" --body \"Description\"\n\n# List issues\ngh issue list\n\n# Close issue\ngh issue close 123"
      },
      {
        "title": "🤝 Contributing",
        "body": "Found an issue or improvement? Pull requests welcome!"
      },
      {
        "title": "📄 License",
        "body": "MIT License"
      },
      {
        "title": "🔗 Related Links",
        "body": "GitHub SSH Documentation\nGitHub CLI Manual\nOpenClaw\n\nMade with ❤️ for developers who value automation"
      }
    ],
    "body": "GitHub Passwordless Setup\n\nComplete guide to setting up passwordless authentication for GitHub using SSH keys and Personal Access Tokens (PAT). Once configured, you'll never need to enter passwords for Git operations or GitHub CLI commands.\n\nVerified Working:\n\n✅ macOS 10.15+ (tested on 14.4)\n✅ Linux (Ubuntu, Debian, Fedora, Arch)\n✅ Windows (WSL2, Git Bash)\n🎯 What This Solves\n\nBefore:\n\n❌ Type password every time you push/pull\n❌ GitHub CLI requires re-authentication\n❌ Tokens expire and break workflows\n❌ HTTPS URLs need credentials repeatedly\n\nAfter:\n\n✅ Zero-password Git operations (push/pull/clone)\n✅ Zero-password repository creation\n✅ Zero-password issue/PR management\n✅ Persistent authentication (no expiration)\n🚀 Quick Setup\n\nOne-line automated setup:\n\ncurl -fsSL https://raw.githubusercontent.com/happydog-intj/github-passwordless-setup/master/setup.sh | bash\n\n\nOr follow the manual steps below.\n\n📋 Manual Setup\nPart 1: SSH Key Configuration\n\nSSH keys enable password-free Git operations (push/pull/clone).\n\nStep 1: Check for Existing SSH Keys\nls -la ~/.ssh/*.pub\n\n\nIf you see id_ed25519.pub or id_rsa.pub, you already have a key. Skip to Step 3.\n\nStep 2: Generate New SSH Key\n\nRecommended: ED25519 (most secure)\n\nssh-keygen -t ed25519 -C \"your-email@example.com\"\n\n\nOr RSA (if ED25519 not supported):\n\nssh-keygen -t rsa -b 4096 -C \"your-email@example.com\"\n\n\nDuring generation:\n\nPress Enter for default location (~/.ssh/id_ed25519)\nEnter passphrase (optional but recommended)\nmacOS will save passphrase to Keychain\nStep 3: Copy Public Key\n# macOS\ncat ~/.ssh/id_ed25519.pub | pbcopy\n\n# Linux (xclip)\ncat ~/.ssh/id_ed25519.pub | xclip -selection clipboard\n\n# Linux (xsel)\ncat ~/.ssh/id_ed25519.pub | xsel --clipboard\n\n# Or just display and copy manually\ncat ~/.ssh/id_ed25519.pub\n\nStep 4: Add Key to GitHub\nVisit: https://github.com/settings/ssh/new\nTitle: Your Computer Name (macOS/Linux)\nKey type: Authentication Key\nKey: Paste your public key\nClick Add SSH key\nStep 5: Test SSH Connection\nssh -T git@github.com\n\n\nExpected output:\n\nHi username! You've successfully authenticated, but GitHub does not provide shell access.\n\nPart 2: GitHub Personal Access Token\n\nPAT enables password-free GitHub CLI operations (create repos, manage issues/PRs).\n\nStep 1: Generate Token\n\nVisit: https://github.com/settings/tokens/new\n\nConfiguration:\n\nNote: OpenClaw CLI Token (or any description)\nExpiration: No expiration (or 90 days)\nSelect scopes:\n✅ repo (all sub-scopes)\n✅ workflow (if using GitHub Actions)\n✅ delete_repo (if you need to delete repositories)\n✅ admin:org (if managing organizations)\n\nClick Generate token and copy it immediately (shown only once!).\n\nFormat: ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\nStep 2: Install GitHub CLI\n\nmacOS:\n\nbrew install gh\n\n\nLinux (Debian/Ubuntu):\n\ntype -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)\ncurl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg\nsudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg\necho \"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\nsudo apt update\nsudo apt install gh -y\n\n\nOther Linux: See: https://github.com/cli/cli/blob/trunk/docs/install_linux.md\n\nStep 3: Configure Token\n# Method 1: Interactive (paste when prompted)\ngh auth login --with-token\n# Then paste your token and press Enter\n\n# Method 2: One-line (replace YOUR_TOKEN)\necho \"ghp_YOUR_TOKEN_HERE\" | gh auth login --with-token\n\nStep 4: Set Git Protocol to SSH\ngh config set git_protocol ssh\n\n\nThis ensures gh commands use SSH (not HTTPS) for Git operations.\n\nPart 3: Verification\nVerify SSH Configuration\n# Test SSH connection\nssh -T git@github.com\n\n# Expected: Hi username! You've successfully authenticated...\n\nVerify GitHub CLI\n# Check authentication status\ngh auth status\n\n# Expected: ✓ Logged in to github.com account username\n\n# Test API access\ngh api user --jq '.login'\n\n# Expected: your-username\n\nVerify Complete Workflow\n# Test creating a repository (will create and delete)\ngh repo create test-auth-$(date +%s) --public --description \"Test\" \\\n  && echo \"✅ Create: SUCCESS\" \\\n  && gh repo delete $(gh repo list --limit 1 --json name --jq '.[0].name') --yes \\\n  && echo \"✅ Delete: SUCCESS\"\n\n\nAll operations should complete without prompting for passwords.\n\n🔄 Convert Existing Repos to SSH\n\nIf you have existing repositories using HTTPS URLs:\n\n# Check current remote\ngit remote -v\n\n# If it shows https://github.com/...\n# Convert to SSH\ngit remote set-url origin git@github.com:username/repo.git\n\n# Verify\ngit remote -v\n# Should show: git@github.com:username/repo.git\n\n\nBatch convert all repos in a directory:\n\nfind . -name \".git\" -type d | while read gitdir; do\n  cd \"$gitdir/..\"\n  if git remote get-url origin 2>/dev/null | grep -q \"https://github.com\"; then\n    REPO=$(git remote get-url origin | sed 's|https://github.com/|git@github.com:|')\n    git remote set-url origin \"$REPO\"\n    echo \"✅ Converted: $(pwd)\"\n  fi\n  cd - > /dev/null\ndone\n\n🛠️ Automated Setup Script\n\nSave this as setup.sh:\n\n#!/bin/bash\nset -e\n\necho \"🔐 GitHub Passwordless Setup\"\necho \"============================\"\necho \"\"\n\n# Check for existing SSH key\nif [ -f ~/.ssh/id_ed25519.pub ]; then\n    echo \"✅ SSH key already exists\"\n    SSH_KEY=$(cat ~/.ssh/id_ed25519.pub)\nelif [ -f ~/.ssh/id_rsa.pub ]; then\n    echo \"✅ SSH key already exists (RSA)\"\n    SSH_KEY=$(cat ~/.ssh/id_rsa.pub)\nelse\n    echo \"📝 Generating new ED25519 SSH key...\"\n    ssh-keygen -t ed25519 -C \"$(whoami)@$(hostname)\" -f ~/.ssh/id_ed25519 -N \"\"\n    SSH_KEY=$(cat ~/.ssh/id_ed25519.pub)\n    echo \"✅ SSH key generated\"\nfi\n\necho \"\"\necho \"🔑 Your public SSH key:\"\necho \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\"\necho \"$SSH_KEY\"\necho \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\"\necho \"\"\necho \"📋 Next steps:\"\necho \"1. Copy the key above\"\necho \"2. Visit: https://github.com/settings/ssh/new\"\necho \"3. Paste the key and save\"\necho \"4. Come back and press Enter to continue\"\nread -p \"Press Enter after adding the key to GitHub...\"\n\n# Test SSH\necho \"\"\necho \"🧪 Testing SSH connection...\"\nif ssh -T git@github.com 2>&1 | grep -q \"successfully authenticated\"; then\n    echo \"✅ SSH authentication successful!\"\nelse\n    echo \"❌ SSH authentication failed. Please check your key on GitHub.\"\n    exit 1\nfi\n\n# Check for GitHub CLI\necho \"\"\nif ! command -v gh &> /dev/null; then\n    echo \"📦 GitHub CLI not found. Install it from:\"\n    echo \"   macOS: brew install gh\"\n    echo \"   Linux: https://github.com/cli/cli/blob/trunk/docs/install_linux.md\"\n    exit 1\nfi\n\n# Configure GitHub CLI\necho \"🎫 Configuring GitHub CLI...\"\necho \"Please enter your GitHub Personal Access Token:\"\necho \"(Visit https://github.com/settings/tokens/new if you don't have one)\"\necho \"\"\ngh auth login --with-token\n\n# Set git protocol to SSH\ngh config set git_protocol ssh\n\n# Verify\necho \"\"\necho \"🔍 Verifying configuration...\"\nif gh auth status &> /dev/null; then\n    echo \"✅ GitHub CLI authenticated\"\n    USERNAME=$(gh api user --jq '.login')\n    echo \"✅ Username: $USERNAME\"\nelse\n    echo \"❌ GitHub CLI authentication failed\"\n    exit 1\nfi\n\necho \"\"\necho \"🎉 Setup complete!\"\necho \"\"\necho \"You can now:\"\necho \"  • Push/pull without passwords: git push\"\necho \"  • Create repos instantly: gh repo create my-project --public\"\necho \"  • Manage issues/PRs: gh issue create, gh pr list\"\necho \"\"\n\n\nMake it executable and run:\n\nchmod +x setup.sh\n./setup.sh\n\n🔍 Troubleshooting\nSSH Issues\n\nProblem: \"Permission denied (publickey)\"\n\n# Check SSH agent\nssh-add -l\n\n# If empty or error, add your key\nssh-add ~/.ssh/id_ed25519\n\n# macOS: Add to Keychain permanently\nssh-add --apple-use-keychain ~/.ssh/id_ed25519\n\n\nProblem: \"Host key verification failed\"\n\n# Remove old host key\nssh-keygen -R github.com\n\n# Reconnect (will prompt to add new key)\nssh -T git@github.com\n\nGitHub CLI Issues\n\nProblem: \"Requires authentication\"\n\n# Check token validity\ngh auth status\n\n# Re-authenticate\ngh auth logout\ngh auth login --with-token\n\n\nProblem: \"Token scopes insufficient\"\n\nCreate a new token with broader scopes:\n\nVisit: https://github.com/settings/tokens\nDelete old token\nCreate new with repo, workflow, delete_repo\nGeneral Issues\n\nCheck Configuration Files:\n\n# SSH config\ncat ~/.ssh/config\n\n# GitHub CLI config\ncat ~/.config/gh/hosts.yml\n\n# Git config\ngit config --global --list\n\n🔒 Security Best Practices\nSSH Keys\nUse ED25519 (more secure than RSA)\nSet a passphrase (optional but recommended)\nUse ssh-agent (macOS Keychain, gnome-keyring)\nNever share private keys (id_ed25519 - no .pub)\nRevoke compromised keys immediately at https://github.com/settings/keys\nPersonal Access Tokens\nMinimum scopes needed (don't select all)\nSet expiration (90 days for security, or no expiration for convenience)\nRevoke unused tokens at https://github.com/settings/tokens\nNever commit tokens to repositories\nRotate regularly (every 90 days recommended)\n📚 Advanced Configuration\nSSH Config File\n\nCreate ~/.ssh/config for custom settings:\n\nHost github.com\n  HostName github.com\n  User git\n  IdentityFile ~/.ssh/id_ed25519\n  AddKeysToAgent yes\n  UseKeychain yes\n\nMultiple GitHub Accounts\n# ~/.ssh/config\nHost github-personal\n  HostName github.com\n  User git\n  IdentityFile ~/.ssh/id_ed25519_personal\n\nHost github-work\n  HostName github.com\n  User git\n  IdentityFile ~/.ssh/id_ed25519_work\n\n\nClone with specific account:\n\ngit clone git@github-personal:username/repo.git\ngit clone git@github-work:company/repo.git\n\nGit Aliases\n\nAdd to ~/.gitconfig:\n\n[alias]\n  pushf = push --force-with-lease\n  undo = reset --soft HEAD~1\n  amend = commit --amend --no-edit\n  sync = !git fetch --all && git pull\n\n🌐 Environment Variables\n\nOptional environment variables for automation:\n\n# GitHub CLI\nexport GH_TOKEN=\"ghp_xxxxx\"  # Auto-auth for gh commands\n\n# Git\nexport GIT_SSH_COMMAND=\"ssh -i ~/.ssh/id_ed25519\"  # Force specific key\n\n\nAdd to your shell profile (~/.bashrc, ~/.zshrc):\n\n# GitHub CLI auto-auth (optional)\nif [ -f ~/.config/gh/token ]; then\n  export GH_TOKEN=$(cat ~/.config/gh/token)\nfi\n\n🔄 Maintenance\nUpdate SSH Key\n# Generate new key\nssh-keygen -t ed25519 -C \"new-email@example.com\"\n\n# Add to GitHub\ncat ~/.ssh/id_ed25519.pub | pbcopy\n# Visit: https://github.com/settings/ssh/new\n\n# Update old repos (if using specific key in config)\ngit config core.sshCommand \"ssh -i ~/.ssh/id_ed25519\"\n\nRotate GitHub Token\n# Create new token at https://github.com/settings/tokens/new\n# Configure it\necho \"ghp_NEW_TOKEN\" | gh auth login --with-token\n\n# Revoke old token at https://github.com/settings/tokens\n\n📊 Comparison: HTTPS vs SSH\nFeature\tHTTPS\tSSH\nAuthentication\tUsername + Token\tSSH Key\nPassword needed\tEvery operation\tNever\nSetup complexity\tLow\tMedium\nSecurity\tGood\tExcellent\nCorporate firewalls\tUsually allowed\tSometimes blocked\nRecommendation\tBeginners\tDaily use\n🎯 Common Workflows\nCreate New Project\n# Create repo and push in one go\ngh repo create my-project --public --source=. --push\n\n# Or step by step\ngh repo create my-project --public\ngit remote add origin git@github.com:username/my-project.git\ngit push -u origin main\n\nClone Private Repo\n# SSH (no password)\ngit clone git@github.com:username/private-repo.git\n\n# Check access\ngh repo view username/private-repo\n\nManage Issues\n# Create issue\ngh issue create --title \"Bug found\" --body \"Description\"\n\n# List issues\ngh issue list\n\n# Close issue\ngh issue close 123\n\n🤝 Contributing\n\nFound an issue or improvement? Pull requests welcome!\n\n📄 License\n\nMIT License\n\n🔗 Related Links\nGitHub SSH Documentation\nGitHub CLI Manual\nOpenClaw\n\nMade with ❤️ for developers who value automation"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/happydog-intj/github-passwordless-setup",
    "publisherUrl": "https://clawhub.ai/happydog-intj/github-passwordless-setup",
    "owner": "happydog-intj",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/github-passwordless-setup",
    "downloadUrl": "https://openagent3.xyz/downloads/github-passwordless-setup",
    "agentUrl": "https://openagent3.xyz/skills/github-passwordless-setup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/github-passwordless-setup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/github-passwordless-setup/agent.md"
  }
}