[FEATURE] Support Auth on Private Marketplaces and Plugins
Resolved 💬 32 comments Opened Oct 17, 2025 by a1flecke Closed Jan 23, 2026
💡 Likely answer: A maintainer (whyuan-cc, contributor)
responded on this thread — see the highlighted reply below.
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
We are a Gitlab SaaS shop and all of our projects are private. As far as I can tell, and as far as I have tried, Claude Code does not support loading private marketplaces and plugins when auth is required. This is an interesting hurdle in distributing our Claude Code augmentation. It would be great if:
- We could use git instead of HTTP when installing marketplaces and plugins
- We could supply Auth with the HTTP requests when installing marketplaces and plugins
Proposed Solution
1) ideally claude would support git links in the sources for plugins and marketplace and just use the already configured git auth.
2) if you really want to keep HTTP then a VENDOR_TOKEN with basic auth when making the http request. Example: if it is a gitlab link AND GITLAB_TOKEN is present then use basic auth in the fetch
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
Developer tools/SDK
Use Case Example
- We are trying to figure out how to distribute our slash commands, skills, agents, etc to 200+ developers. Plugins seem designed for this
- We do not want to publicly expose this
- We use Gitlab SaaS so the server is not in our network and requires auth
- We are now trying to come up with a weird reverse mirror or auto-syncing or something to get around this limitation
Additional Context
_No response_
32 Comments
I am dealing with this gap as well. We definitely could use this!
This would be useful
This is definitely needed
This would be an awesome feature for team onboarding!
You can add a private gitlab repo as a marketplace by using a project access token. The token needs the
read_repositoryscope. You then use it with the https url as the password. They are described here.To test a given token you can attempt to clone the repository:
(reminder that USERNAME can be anything and TOKEN is your project access token).
I think that the token role may affect this? If you have the token set up but cannot clone it try increasing the role permission. Developer worked for me.
If this works then you can add the marketplace using this url _with
.giton the end_. For example:This did not work for me when the url lacked the
.gitsuffix.I also vote for this feature request!
yes please.
Hitting the same wall here. Would appreciate being able to use my SSH key to authenticate to my private gitlab.
I have succeeded in using my private repository by adding my SSH key to my ssh agent. As i'm on mac I'm even using keychain and it seems to work like a charm.
Quoting Claude itself.
Would like to see support for this. I have the exact same use-case raised by the OP and not found a good workaround yet.
Also experiencing this issue. I'm trying to make the marketplace a built-in part of a different private repo in the same GitLab account, and putting a token in the path is a violation of SOC2 compliance policies.
This should be using the system's GIT credentials by default.
Also experiencing this issue. Would be incredible for managing internal Claude Code plugins!
Investigation Findings
I ran into this same issue with a private GitHub repository and did some debugging. Here's what I found:
Root Cause
When
/plugin marketplace addrunsgit clone, the subprocess doesn't inherit authentication context:GITHUB_TOKENenvironment variable is not passed to the git subprocessgh auth git-credentialhelper (configured viacredential.https://github.com.helper) doesn't work in the non-interactive subprocess contextThis explains why public repositories work fine (no auth needed) while private repositories fail with:
Evidence
In my shell session:
gh auth statusshows active authentication withGITHUB_TOKENgit ls-remote https://github.com/my-org/private-repo.gitworks perfectly/plugin marketplace add https://github.com/my-org/private-repo.gitfailsThe difference is that my shell has
GITHUB_TOKENset and access to the credential helper, but the spawned git process does not.Workaround
For anyone hitting this with GitHub private repos, here's a manual workaround:
After this,
/plugin install <plugin-name>works normally.Suggested Fix
The fix would be to pass relevant auth environment variables (
GITHUB_TOKEN,GITLAB_TOKEN, etc.) to the git subprocess when cloning. This would leverage the user's existing authentication setup without requiring any new configuration.Looking at the bundled CLI source, I found that Claude Code intentionally disables credential helpers by setting the
-c "credential.helper="flag to an empty string, bypassing any configured credential helpers.As @matthewfranglen mentioned, baking the token into the HTTPS URL works for cloning the marketplace repo itself:
However, this breaks if you need nested plugin sources, i.e., if your
marketplace.jsonreferences plugins in other private repos:And there is no way AFAIK to inject the token in that URL (unless you are willing to hardcode the token in the
marketplace.json)+1 this is needed
As a workaround, I'm using a custom claude command that pulls the private marketplace created with the workaround method suggested by @lindner. Thanks for the investigation and the workaround example.
I've fed @lindner's comment to claude code to make a custom command and it works just fine.
example: https://github.com/cooco119/claude-plugin-private-marketplace-helper
We merged the PR, which should be in the next release of Claude Code. It should work
Can't wait for this release :)
This is great, thanks. What about for GitLab?
I am still running into this issue in claude code 2.1.6 version and gitlab self-hosted
First attempt:
Just setting the env var:
Second attempt:
Specifying also my gitlab username:
So if I have to hardcode the token in the git url, then when my token expires I would have to manually go through the setup again. I hope that
GITLAB_TOKENvariable will allow to avoid that hurdle, as I can configure my terminal to load the token dynamically when starting a new sessionit looks it work without export also, do you see any place where have this issue and need to handle this way, it we put URL simply in setting.,json it works
Is there a reason why using the system git to clone the repo with the system settings was not considered? That would allow installing any marketplace or plugin from any git repo to which you have access without having to handle special site specific tokens.
@whyuan-cc for those not initially using token auth, this requires either a PAT with a great deal of access or building your own workaround similar to the one outlined above for manually modifying files in the install, which is obviously ugly. I'd say inheriting the environment including whatever git/gh auth is set up is a necessary precondition for private marketplaces. The current status is untenable.
For anyone who is creating a github PAT restricted to the marketplace repo that doesn't want it messing with the rest of their auth:
↑ add this to ~/.zshrc
this is filthy, and I'll probably move it into keychain shortly but it does work and isolates the environment variable.
-----
In general, the user's own github auth setup is a necessary precondition for many nice workflows, like private marketplaces, pulling github issue contents, etc.
Agreed. The last release introduced support for GitHub and Bitbucket tokens, and requires users to obtain a token just to install the marketplace. The user already has their SSH set up. Why would they bother creating an access token again?
I created a custom slash command that clones the private marketplace manually (the ugly way), and I will stick to it.
@whyuan-cc How does this work for automated updates, provided the initial token expires?
thanks for more feedback. We will investigate automatically get auth from git env.
IIt would be good if the solution were more flexible. I use GitHub, GitLab, GitLab self-host, and Forgejo for various collaborations.
Not sure when this was fixed but now I am getting error messages about missing GITHUB_TOKEN. Setting it properly appears to work fine now!
2.1.19 has the fix for using existing credentials, without manually exporting env vars like GITHUB_TOKEN.
So what about azure devops repos?
Hi @whyuan-cc, thanks! However, that fix doesn't seem to have flowed through to the autoupdate path? There's a
disableCredentialHelperwhich is hardcoded to true and not configurable by any meansThis issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.