Skip to content

docs: add Private Modules howto page#60

Merged
ankurs merged 3 commits intomainfrom
docs/private-modules
Apr 6, 2026
Merged

docs: add Private Modules howto page#60
ankurs merged 3 commits intomainfrom
docs/private-modules

Conversation

@ankurs
Copy link
Copy Markdown
Member

@ankurs ankurs commented Apr 6, 2026

Summary

  • New howto/private-modules.md covering:
    • Local dev auth (SSH, PAT/.netrc, GOAUTH)
    • Docker builds (token build args, SSH agent forwarding)
    • GitHub Actions (GO_PRIVATE_TOKEN secret)
    • GitLab CI (CI_JOB_TOKEN, nested subgroups workaround)
    • Troubleshooting table (410 Gone, 404, auth denied)
  • quickstart.md: add Private Modules section linking to howto
  • Playwright navigation test updated

Test plan

  • Playwright tests pass
  • Private Modules page renders correctly

Summary by CodeRabbit

  • Documentation

    • Added comprehensive guide for configuring Go private module access in ColdBrew services, covering authentication setup, Docker builds, GitHub Actions, and GitLab CI configuration
    • Updated Getting Started guide with private modules overview and authentication setup instructions
    • Included troubleshooting reference for common errors
  • Tests

    • Added test coverage for new How-To documentation page

- New howto/private-modules.md: SSH, PAT, .netrc, GOAUTH, Docker,
  GitHub Actions, GitLab CI (including nested subgroups), troubleshooting
- quickstart.md: add Private Modules section linking to howto
- navigation tests: add /howto/private-modules/
Copilot AI review requested due to automatic review settings April 6, 2026 06:00
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

Adds a comprehensive documentation page about configuring Go private module access in ColdBrew services, covering local development authentication, Docker build strategies, and CI/CD workflows for GitHub Actions and GitLab CI. Also updates the quickstart guide with a brief reference and adds the new page to the test suite.

Changes

Cohort / File(s) Summary
Documentation
howto/private-modules.md, quickstart.md
New guide covering Go private module configuration, authentication methods (SSH rewrites, .netrc, personal access tokens), Docker build approaches (BuildKit secrets, SSH agent forwarding), CI setup for GitHub Actions and GitLab CI, and troubleshooting table for common errors.
Tests
tests/navigation.spec.ts
Added /howto/private-modules/ route to the howtoPages array for HTTP 200 validation and heading visibility checks.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly Related PRs

  • PR #56: Adds another new how-to documentation page with the same pattern of extending the howtoPages test array.
  • PR #41: Updates documentation and adds a separate how-to route to the howtoPages test array in the same manner.

Poem

🐰 Hops through modules, private and secure,
SSH keys and tokens ensure,
BuildKit secrets whisper low,
In CI pipelines, safely they flow,
Go's secrets kept, configuration clear!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add Private Modules howto page' directly and accurately describes the main change: adding a new documentation page for private modules configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/private-modules

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Private Modules” how-to page to the docs site and wires it into the Getting Started guide and Playwright navigation coverage, so users can reliably find/setup authentication for private Go module dependencies.

Changes:

  • Add howto/private-modules.md covering local dev, Docker, and CI auth patterns for private modules.
  • Link to the new guide from quickstart.md.
  • Extend Playwright navigation smoke test coverage to include the new how-to route.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/navigation.spec.ts Adds /howto/private-modules/ to the list of how-to pages that must load successfully.
quickstart.md Introduces a “Private Modules” section linking to the new how-to guide.
howto/private-modules.md New documentation page describing GOPRIVATE and authentication approaches for GitHub/GitLab, Docker, and CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread howto/private-modules.md Outdated
Comment thread howto/private-modules.md Outdated
Comment thread howto/private-modules.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread howto/private-modules.md Outdated
Comment thread howto/private-modules.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
howto/private-modules.md (1)

37-42: Harden .netrc setup to avoid credential leakage and duplicate entries.

Using >> ~/.netrc can duplicate credentials over time, and the snippet does not enforce restrictive permissions (0600). Please switch to overwrite + permission hardening in the example.

Suggested doc patch
-# GitHub
-echo "machine github.com login x-access-token password YOUR_PAT" >> ~/.netrc
+# GitHub
+cat > ~/.netrc <<'EOF'
+machine github.com
+  login x-access-token
+  password YOUR_PAT
+EOF
+chmod 600 ~/.netrc
 
-# GitLab (needs read_repository scope)
-echo "machine gitlab.com login your-username password YOUR_PAT" >> ~/.netrc
+# GitLab (needs read_repository scope)
+cat >> ~/.netrc <<'EOF'
+machine gitlab.com
+  login your-username
+  password YOUR_PAT
+EOF
+chmod 600 ~/.netrc
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@howto/private-modules.md` around lines 37 - 42, Replace the append pattern
using the exact echoed lines ("echo \"machine github.com login x-access-token
password YOUR_PAT\" >> ~/.netrc" and the GitLab equivalent) with a safer
sequence that 1) removes any existing entry for the same machine to avoid
duplicates, 2) writes the new credential using an overwrite or temporary file
swap so you don't produce duplicate lines, and 3) enforces strict file
permissions (chmod 0600) on ~/.netrc; update the docs to show the
overwrite+permission hardening pattern and reference the original echo lines as
the strings to be written and ~/.netrc as the target file to ensure clarity.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@howto/private-modules.md`:
- Around line 37-42: Replace the append pattern using the exact echoed lines
("echo \"machine github.com login x-access-token password YOUR_PAT\" >>
~/.netrc" and the GitLab equivalent) with a safer sequence that 1) removes any
existing entry for the same machine to avoid duplicates, 2) writes the new
credential using an overwrite or temporary file swap so you don't produce
duplicate lines, and 3) enforces strict file permissions (chmod 0600) on
~/.netrc; update the docs to show the overwrite+permission hardening pattern and
reference the original echo lines as the strings to be written and ~/.netrc as
the target file to ensure clarity.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee08e978-5dff-4735-befc-8e2a6f8bb63b

📥 Commits

Reviewing files that changed from the base of the PR and between 3522b11 and d79c5a9.

📒 Files selected for processing (3)
  • howto/private-modules.md
  • quickstart.md
  • tests/navigation.spec.ts

@ankurs ankurs merged commit cb32d61 into main Apr 6, 2026
7 checks passed
@ankurs ankurs deleted the docs/private-modules branch April 6, 2026 09:02
@coderabbitai coderabbitai Bot mentioned this pull request Apr 10, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants