ghcr_login_guide
Authenticate to GitHub Container Registry for Docker operations by providing step-by-step login instructions and credential setup guidance.
Instructions
Guide through GHCR authentication
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:456-502 (handler)The complete implementation of the 'ghcr_login_guide' tool, including registration to the MCP server, input schema (github_username), and the handler function that returns a detailed text guide for authenticating with GitHub Container Registry (GHCR). The handler provides step-by-step instructions for creating PATs, logging in via Docker CLI, and using in GitHub Actions."ghcr_login_guide", "Guide through GHCR authentication", { github_username: { type: "string", description: "Your GitHub username" } }, async ({ github_username }) => { return { content: [{ type: "text", text: `GITHUB CONTAINER REGISTRY (GHCR) LOGIN GUIDE Step 1: Create a Personal Access Token (PAT) -------------------------------------------- 1. Go to: https://github.com/settings/tokens/new 2. Give it a name like "GHCR Push Token" 3. Select scopes: [x] write:packages [x] read:packages [x] delete:packages (optional) 4. Click "Generate token" 5. COPY THE TOKEN NOW (you won't see it again!) Step 2: Login to GHCR --------------------- Option A - Interactive (paste token when prompted): docker login ghcr.io -u ${github_username} Option B - Using environment variable: export CR_PAT=your_token_here echo $CR_PAT | docker login ghcr.io -u ${github_username} --password-stdin Step 3: Verify Login -------------------- docker pull ghcr.io/github/super-linter:latest (If this works, you're logged in!) FOR CI/CD (GitHub Actions): --------------------------- Use the built-in GITHUB_TOKEN: - name: Login to GHCR uses: docker/login-action@v3 with: registry: ghcr.io username: \${{ github.actor }} password: \${{ secrets.GITHUB_TOKEN }}` }] }; } );
- src/index.js:456-502 (registration)MCP server.tool() call that registers the 'ghcr_login_guide' tool with name, description, schema, and handler."ghcr_login_guide", "Guide through GHCR authentication", { github_username: { type: "string", description: "Your GitHub username" } }, async ({ github_username }) => { return { content: [{ type: "text", text: `GITHUB CONTAINER REGISTRY (GHCR) LOGIN GUIDE Step 1: Create a Personal Access Token (PAT) -------------------------------------------- 1. Go to: https://github.com/settings/tokens/new 2. Give it a name like "GHCR Push Token" 3. Select scopes: [x] write:packages [x] read:packages [x] delete:packages (optional) 4. Click "Generate token" 5. COPY THE TOKEN NOW (you won't see it again!) Step 2: Login to GHCR --------------------- Option A - Interactive (paste token when prompted): docker login ghcr.io -u ${github_username} Option B - Using environment variable: export CR_PAT=your_token_here echo $CR_PAT | docker login ghcr.io -u ${github_username} --password-stdin Step 3: Verify Login -------------------- docker pull ghcr.io/github/super-linter:latest (If this works, you're logged in!) FOR CI/CD (GitHub Actions): --------------------------- Use the built-in GITHUB_TOKEN: - name: Login to GHCR uses: docker/login-action@v3 with: registry: ghcr.io username: \${{ github.actor }} password: \${{ secrets.GITHUB_TOKEN }}` }] }; } );
- src/index.js:458-458 (schema)Input schema for the ghcr_login_guide tool, requiring an optional github_username parameter.{ github_username: { type: "string", description: "Your GitHub username" } },