Omniscio

OmniscioGuidesFailed to clone marketplace repository

Failed to clone marketplace repository: the words after the colon name the cause

Claude Code adds a marketplace by cloning its repository. When the clone fails it prints this prefix and then, after the colon, the line git or its own checks produced. For those failures the fix is in the words after the colon. The timeout below is the one failure reported without the prefix.

Last checked against Anthropic's documentation on November 25, 2026. By the Omniscio team. Updated .

What is the exact message?

Three failures arrive behind that prefix. A line that ends at the colon with nothing after it is not one of the cases below.

Failed to clone marketplace repository: SSH authentication failed
Failed to clone marketplace repository: HTTPS authentication failed
Failed to clone marketplace repository: Command 'git' not found or is in an unsafe location (current directory)
SSH host key is not in your known_hosts file
Git clone timed out after 120s

The timeout carries a hint to set CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS.

Check the repository before anything else

A misspelled owner/repo, a repository that does not exist, and a private repository you cannot see all end in the same authentication message. So do this first:

  • Open the repository URL in your browser, or
  • run git ls-remote <url> in your terminal, which asks the same server the same question the clone does.

Success prints a list of refs and their commit hashes. If that check fails, fix your access to the repository before doing any credential work for Claude Code specifically: a network or proxy problem reaches the same server the clone does.

For a GitHub owner/repo source, the URL to test is https://github.com/owner/repo.

SSH authentication failed or HTTPS authentication failed

Claude Code turns off git's prompts and askpass programs, including one set in GIT_ASKPASS, and runs SSH in batch mode. Only credentials git can get without a prompt or an askpass program succeed, which is why a clone that works when you type a passphrase can still fail here.

The clone's own error says which prompt was blocked: fatal: Cannot prompt because user interactivity has been disabled, terminal prompts disabled, or fatal: unable to get password from user.

Fix SSH

The check has to succeed without prompting, so run it in the mode that refuses to ask, which is how Claude Code's own clone behaves:

ssh -o BatchMode=yes -T git@<host>
  • A key that stops at a passphrase prompt fails here. It needs to be available without one, or add the marketplace over HTTPS instead.
  • A host that is not yet in known_hosts fails too; the host-key section below is that fix.

Fix HTTPS

  • Your credential helper must hold a token for the host.
  • For GitHub, run gh auth login then gh auth setup-git.
  • For another host, store a personal access token in your git credential helper.
  • Test it the way Anthropic documents: unset GIT_ASKPASS, then run git -c core.askPass= ls-remote <url>.

Once the check for your protocol succeeds without a prompt, run the add again from the same shell:

claude plugin marketplace add <source>

To keep GitHub owner/repo sources off SSH altogether, set CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1 in the shell you start Claude Code from. Without it Claude Code clones them over SSH when an SSH key for github.com looks configured, and falls back to HTTPS when that clone fails.

SSH host key is not in your known_hosts file

Claude Code clones with StrictHostKeyChecking=yes, so it refuses a host whose key you have not accepted rather than accepting it for you. Connect once from your terminal to accept the fingerprint, then retry the add:

ssh -T git@github.com

For a host whose key changed, the line reads SSH host key has changed and the hint is ssh-keygen -R <host> instead. For a public repository, adding the marketplace by its https:// URL avoids SSH entirely.

Command 'git' not found or is in an unsafe location

On Windows, this means Claude Code could not find git on your PATH. It also refuses to run a git found only in the current directory, which is why the message adds "unsafe location".

  1. Install Git for Windows, which puts git on your PATH.
  2. Open a new terminal, so the updated PATH applies.
  3. Confirm git --version prints a version.
  4. Run claude plugin marketplace add <source> again.

Git clone timed out after 120s

Cloning a marketplace, and re-cloning one to update it, gets 120 seconds by default. For a large repository or a slow connection, raise the limit in milliseconds:

export CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS=300000
$env:CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS = "300000"

The second form is PowerShell. Start Claude Code from that shell and retry the add.

  • In a monorepo, limit the checkout to the directories you name with claude plugin marketplace add <source> --sparse <paths>.
  • With large git submodules, update Claude Code. On v2.1.295 and later it fetches only the submodules that hold plugin files, while earlier versions fetch every submodule and can use up the 120 seconds on their own.

How do I know it is fixed?

  • The add command finishes with no clone message.
  • /plugin marketplace list shows the marketplace, which is the check Anthropic's page gives for a successful add.

Where these answers come from

Common questions

Why can't Claude Code clone a marketplace my terminal can?

Because your terminal prompts and Claude Code does not. Claude Code turns off git's prompts and askpass programs, including one set in GIT_ASKPASS, and runs SSH in batch mode, so only credentials git can get without asking a person succeed. A passphrase-protected key or a password prompt works interactively and fails here.

How do I test my credentials the way Claude Code does?

Run git ls-remote on the repository URL. For SSH, ssh -T git@<host> must succeed without prompting for a passphrase and the host must already be in known_hosts. For HTTPS, unset GIT_ASKPASS and run git -c core.askPass= ls-remote <url>, which is the check Anthropic documents.

Why did the SSH clone fail on a host I have never connected to?

Claude Code clones with StrictHostKeyChecking=yes, so it refuses a host whose key you have not accepted instead of accepting it automatically. Connect once from your terminal with ssh -T git@<host> to accept the fingerprint, then retry the add.

Can I avoid SSH entirely for a GitHub marketplace?

Yes. Set CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1 in the shell you start Claude Code from, and it skips SSH for GitHub owner/repo sources. Adding the marketplace by its https:// URL avoids SSH as well.

How do I know the marketplace was added?

Run /plugin marketplace list. Anthropic's plugin troubleshooting page gives that as the check that the add worked, and it is also how you check the spelling of a marketplace you already have.