Add a private GitHub marketplace using shell authentication
Adds a private GitHub marketplace using your shell's git authentication.
/plugin marketplace add krafton-ax/claude-plugin-private-marketplace-helper/plugin install krafton-ax-private-marketplace-helper-plugins-private-marketplace-helper@krafton-ax/claude-plugin-private-marketplace-helper<github-url>Add a private GitHub marketplace plugin using your shell's git authentication context.
This works around Claude Code's limitation with private repository authentication by using your shell's existing git credentials.
github:org/repo - GitHub shorthand (native Claude Code format)org/repo - Short format (assumes GitHub)https://github.com/org/repo.git - HTTPS URLgit@github.com:org/repo.git - SSH URLParse the user's input to extract the repository URL and marketplace name.
URL Normalization Rules:
| Input | Normalized URL | Name |
|---|---|---|
github:org/repo | https://github.com/org/repo.git | repo |
org/repo | https://github.com/org/repo.git | repo |
https://github.com/org/repo.git | (as-is) | repo |
https://github.com/org/repo | add .git suffix | repo |
git@github.com:org/repo.git | (as-is) | repo |
Extract the marketplace name from the repo name (last part of the path, without .git).
ls ~/.claude/plugins/marketplaces/<marketplace-name> 2>/dev/null
If directory exists, ask user if they want to update (git pull) or skip.
Run git clone using the user's shell authentication:
cd ~/.claude/plugins/marketplaces && git clone <normalized-url> <marketplace-name>
If HTTPS clone fails, suggest trying SSH:
HTTPS clone failed. Try SSH URL instead:
/private-marketplace-helper:add git@github.com:org/repo.git
If SSH clone fails, suggest:
ssh -T git@github.comRead ~/.claude/plugins/known_marketplaces.json, then use Edit tool to add the new marketplace entry:
{
"<marketplace-name>": {
"source": {
"source": "git",
"url": "<normalized-url>"
},
"installLocation": "<full-path-to-marketplace>",
"lastUpdated": "<current-ISO-timestamp>"
}
}
Merge with existing entries, do not overwrite the entire file.
Check for valid marketplace structure:
cat ~/.claude/plugins/marketplaces/<name>/.claude-plugin/marketplace.json 2>/dev/null
Parse the marketplace.json to list available plugins.
Success output:
Marketplace '<name>' added successfully!
Available plugins:
- plugin-name-1
- plugin-name-2
Install with:
claude plugin install <plugin-name>@<marketplace-name>
If no marketplace.json found:
Warning: No .claude-plugin/marketplace.json found.
This repository may not be a valid Claude Code marketplace.