gitingest icon indicating copy to clipboard operation
gitingest copied to clipboard

feat: private repo access

Open ashifhusainoo7 opened this issue 9 months ago • 8 comments

There should be an option available where i can provide an access token or based on Auth i should be able to use gitingest with my private repo as well. most of the cases for professional users it will be the best available features.

ashifhusainoo7 avatar Mar 29 '25 05:03 ashifhusainoo7

Agree.

Syazvinski avatar Apr 01 '25 14:04 Syazvinski

Yesss, we need it asap, just like https://gitdiagram.com/

abdellatif-laghjaj avatar Apr 03 '25 17:04 abdellatif-laghjaj

bump

beenycool avatar Apr 05 '25 16:04 beenycool

There should be an option available where i can provide an access token or based on Auth i should be able to use gitingest with my private repo as well. most of the cases for professional users it will be the best available features.

Use "Export to LLM Gitingest" Vscode extension

GitHub: https://github.com/lakpahana/export-to-llm-gitingest ( please give me a 🌟) Marketplace: https://marketplace.visualstudio.com/items?itemName=lakpahana.export-to-llm-gitingest

lakpahana avatar Apr 06 '25 07:04 lakpahana

Can't you use the cli to do that or do you want it in the website?

KacemMathlouthi avatar Apr 19 '25 05:04 KacemMathlouthi

Hi @ashifhusainoo7 and others — great news!

Private-repo support just landed on main via PR #282 (merged 2025-06-15). You can already ingest a private repository from the CLI or Python API:

# PAT needs at least the “repo” (or narrower “repo:read”) scope
export GITHUB_TOKEN=github_pat_********

# any of these work
gitingest https://github.com/my-user/my-private-repo                    # uses env-var
gitingest https://github.com/my-user/my-private-repo --token <PAT>
gitingest -t <PAT> https://github.com/my-user/my-private-repo
from gitingest import ingest
ingest("https://github.com/my-user/my-private-repo", token="<PAT>")

How it works

  • The token (github_pat_*, ghp_*, etc.) is injected into git via http.https://github.com/.extraheader, so partial clones, sparse-checkout and commit pins behave exactly as they do for public repos.
  • Public-repo workflows stay unchanged — if there’s no token, no auth header is sent.

What’s next

Timeline Scope
Later this week PyPI release of the core library & CLI with PAT support t.
Afterwards A separate follow-up PR will surface a PAT field in the gitingest.com web UI.

In the meantime you can grab the development build:

pip install --pre --upgrade git+https://github.com/cyclotruc/gitingest.git

To generate a GitHub Personal Access Token (PAT), go to (ProfileSettingsDeveloper SettingsPersonal Access TokensFine-grained Tokens), or click here.

Let me know if you run into any issues — happy to help! 🎉

filipchristiansen avatar Jun 16 '25 16:06 filipchristiansen

@filipchristiansen Hi, thank you for this news, but it would be much better if this integrated in the UI of the gitingest website !!

abdellatif-laghjaj avatar Jun 16 '25 21:06 abdellatif-laghjaj

@abdellatif-laghjaj I understand. As mentioned in my comment, we plan a separate follow-up PR that will surface a PAT field in the gitingest.com web UI.

filipchristiansen avatar Jun 17 '25 11:06 filipchristiansen

@filipchristiansen merged a PR addressing the UI missing, this has been shipped to https://gitingest.com and will soon be released in the 0.1.5 version of the Pip package

cyclotruc avatar Jun 22 '25 16:06 cyclotruc