Open
Description
Description
When using Gitea's migration feature with multiple OAuth tokens provided in the token parameter (comma-separated), only the first token is actually used for API requests. The remaining tokens are ignored, even though they are correctly parsed and added via downloader.addClient.
Steps to Reproduce
- Use the migration tool to import repositories from a source like GitHub or Gitea.
- Provide multiple access tokens (e.g., token1,token2,token3) in the token input.
- Observe that only the first token is used throughout the migration process.
Expected Behavior
- The migration should:
- Use all provided tokens either in a round-robin manner,
- Or retry using the next token if the previous one is rate-limited or unauthorized.
Actual Behavior
- Only the first token is ever used.
- The second and third tokens are parsed and clients are added, but never utilized.
Gitea Version
1.24.0+rc0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
docker
Database
None