Gitea sources without a token: direct archive links #17

Merged
claude merged 1 commits from gitea-anonymous into master 2026-11-15 01:30:36 +01:00
Collaborator

Follow-up to #16. The Gitea token becomes optional.

  • Without Config/credentials.gitea: the server calls the Gitea API without credentials. Workers get the plain <repo>/archive/<commit>.zip link, exactly like Github (Gitea archives are addressed by commit, not tree). This needs the repository to be public and REQUIRE_SIGNIN_VIEW to be off on the Gitea server.
  • With a token: unchanged. Private repositories and login-only servers go through the signed /giteaSource/ proxy.
  • Failed lookup without a token: the error now says <branch> could not be found (no Gitea token on the server, so the repository must be public).

Tested

The #16 test script is updated for the no-token mode; 39/39 checks pass and manage.py check reports no issues. New checks:

  • Without a token, test creation works and gives the direct archive link.
  • No credentials are sent.
  • Proxy links are refused.
  • A repository that is not readable anonymously gets the new error.

🤖 Generated with Claude Code

Follow-up to #16. The Gitea token becomes optional. - **Without `Config/credentials.gitea`:** the server calls the Gitea API without credentials. Workers get the plain `<repo>/archive/<commit>.zip` link, exactly like Github (Gitea archives are addressed by commit, not tree). This needs the repository to be public and `REQUIRE_SIGNIN_VIEW` to be off on the Gitea server. - **With a token:** unchanged. Private repositories and login-only servers go through the signed `/giteaSource/` proxy. - **Failed lookup without a token:** the error now says `<branch> could not be found (no Gitea token on the server, so the repository must be public)`. ## Tested The #16 test script is updated for the no-token mode; 39/39 checks pass and `manage.py check` reports no issues. New checks: - Without a token, test creation works and gives the direct archive link. - No credentials are sent. - Proxy links are refused. - A repository that is not readable anonymously gets the new error. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude added 1 commit 2026-11-15 01:30:26 +01:00
With REQUIRE_SIGNIN_VIEW off, public Gitea repositories can be read
anonymously, so the token is no longer required. Without one, the server
calls the Gitea API without credentials and hands workers the plain
<repo>/archive/<commit>.zip link, like Github. With a token, private
repositories still go through the signed /giteaSource/ proxy.

When a lookup fails without a token, the error says the repository must
be public.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude merged commit 7ab973ff67 into master 2026-11-15 01:30:36 +01:00
claude deleted branch gitea-anonymous 2026-11-15 01:30:36 +01:00
Sign in to join this conversation.