Skip to content

ov add-resource fails to index GitLab repository with OAuth2 token in URL #1734

@walnut-tom

Description

@walnut-tom

Description

When adding a GitLab repository using ov add-resource with OAuth2 token embedded in the HTTPS URL, the indexing process appears to complete but does not properly index the repository content.

Steps to Reproduce

  1. Run ov add-resource https://oauth2:<token>@gitlab.example.com/group/repo.git --to viking://resources/repo --timeout 300
  2. Wait for indexing to complete (queue shows all tasks processed)
  3. Run ov tree viking://resources/repo -L 2 to inspect the indexed content

Expected Behavior

The repository should be properly indexed with all files and directories accessible via ov ls or ov tree commands.

Actual Behavior

  • Indexing process reports success with all queue tasks completed
  • ov tree only shows a single .md file or incorrect content (e.g., .html file in temp path)
  • The actual repository content is not indexed

Workaround

Cloning the repository locally first, then adding the local path works:

git clone https://oauth2:<token>@gitlab.example.com/group/repo.git /tmp/repo
ov add-resource /tmp/repo --to viking://resources/repo --timeout 600

Environment

  • OpenViking version: (please fill)
  • OS: macOS/Linux
  • GitLab version: (if known)

Additional Context

The issue may be related to how OpenViking handles authentication in URLs or processes the initial repository fetch when using embedded credentials.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions