Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Power installation from private GitHub repo fails

Open hghandri opened this issue 9 months ago • 6 comments

Before opening, please confirm:

Operating System

macOS Sequoia 15.6.1

Kiro Version

0.10.16

Bug Description

When installing a custom Power from a private GitHub repository using a token-authenticated HTTPS URL (https://[email protected]/...), the token is not propagated to the repositoryCloneUrl field in ~/.kiro/powers/registries/user-added.json. As a result, the clone fails silently and the power is never installed.

Steps to Reproduce

1 - Open the Powers panel in Kiro 2 - Add a custom power using a private GitHub URL with token auth: https://[email protected]/org/repo/tree/main/powers/my-power 3 - Observe the success notification 4 - Open ~/.kiro/powers/registries/user-added.json

Expected Behavior

The repositoryCloneUrl field should preserve the token from the provided URL:

"repositoryCloneUrl":` "https://[email protected]/org/repo.git"

Actual Behaviour The token is stripped from repositoryCloneUrl — only the clean URL is stored:

"repositoryCloneUrl": "https://github.com/org/repo.git"

The token ends up only in repositoryUrl which is display-only field and not used for the actual clone operation. The power is never cloned into ~/.kiro/powers/installed/.

Conversation ID

No response

Additional Context

Public repo powers install correctly — the issue is specific to private repos requiring token-based HTTPS authentication

hghandri avatar Feb 22 '26 03:02 hghandri

Thanks for opening this issue and for the detailed reproduction steps! 🙏 It's clear that the authentication token is being stripped from the clone URL during private repo Power installation, which is a great catch. A maintainer will take a look at this soon — we really appreciate you helping us improve the Powers experience!

github-actions[bot] avatar Feb 22 '26 03:02 github-actions[bot]

++. Still experiencing this issue. I have also opened an issue at - https://github.com/kirodotdev/powers/issues/72 for the same.

arpit-dlv avatar Mar 12 '26 12:03 arpit-dlv

+1 It looks like Kiro supports only public Powers repos, but I really +1 the idea of a feature to install Powers from private repos!

olegy-ait avatar Mar 12 '26 19:03 olegy-ait

Thanks for reporting this @hghandri - @olegy-ait is correct, currently powers only support public github repos. A work around is to place the power source files in a local directly and import from there. Will mark this as a feature request

nadetastic avatar Apr 17 '26 16:04 nadetastic

Still reproduces on IDE 1.0.337 (macOS). Adding what looks like the root cause, which is a bit broader than the token not being persisted.

Cross-reference: kirodotdev/powers#72 is the same failure reported against the powers repo.

Kiro does not shell out to git for this. It clones with isomorphic-git over HTTP, and the call passes no authentication of any kind:

await git.clone({ fs, http, dir: n, url: o, ref: e, singleBranch: true, depth: 1 })

There is no onAuth, no onAuthFailure, no headers and no token anywhere in that code path. The URL is first normalised by:

function normaliseCloneUrl(t) {
  return t.startsWith("[email protected]:")
    ? t.replace("[email protected]:", "https://github.com/").replace(/\.git$/, "")
    : t.replace(/\.git$/, "");
}

Three consequences:

  1. Only anonymous HTTPS is possible. Even with the token preserved in repositoryCloneUrl as this issue asks for, there is no onAuth callback to consume it. Whether https://TOKEN@host/... works then depends entirely on isomorphic-git forwarding URL userinfo as basic auth, which is not what the surrounding code appears to intend.
  2. SSH is not supported at all, and only the literal [email protected]: prefix is rewritten. An SSH host alias from ~/.ssh/config — common with per-account deploy keys — is passed through unchanged and cannot resolve.
  3. The user's git credential helper is never consulted, so a repo that clones fine from the terminal still fails here. That matches the report.

Easy to confirm without Kiro, by probing the endpoint the clone would hit:

$ curl -s -o /dev/null -w '%{http_code}' \
    https://github.com/<org>/<private-repo>/info/refs?service=git-upload-pack
401

$ curl -s -o /dev/null -w '%{http_code}' \
    https://github.com/kirodotdev/powers/info/refs?service=git-upload-pack
200

Also worth noting for whoever picks this up: persisting a PAT into repositoryCloneUrl would write a plaintext credential into ~/.kiro/powers/registries/user-added.json, a file Kiro rewrites on every add/remove. That seems worth avoiding in favour of an onAuth callback backed by the platform keychain, or delegating to the system git so existing credential helpers and SSH config just work.

Workaround in the meantime, which is what the docs already suggest for private repos: clone manually and install from a local path. That avoids the clone entirely, since a source of {"type": "local", "path": "..."} is used directly with no network access. Be aware it has a separate cosmetic consequence — powers added that way get no icon or description in the Powers UI, tracked in #11161.

robomnis avatar Sep 13 '26 19:09 robomnis

Adding a concrete use case and a +1 for native private GitHub repository support in both Kiro IDE and CLI.

I maintain a private repository of personal agent plugins containing guidance, skills, and tools, and use it across multiple agent harnesses. For Kiro, my current workaround is to clone the repository into a temporary directory and run kiro-cli powers install against the plugin's subdirectory. Updating means making another fresh clone and reinstalling the power.

I'd like to install and update a plugin/power directly from its private GitHub repository, including a selected branch/ref and a subdirectory within a repository containing multiple plugins. Ideally Kiro would reuse existing authenticated GitHub access (such as Git credential helpers or SSH), or provide a secure sign-in flow, without requiring a token embedded in the repository URL.

This would make private personal and team plugins practical to maintain without manually cloning the source for every installation or update. Please cover updates as well as initial installation, and make authentication failures visible and actionable.

athreygonella avatar Nov 05 '26 18:11 athreygonella