Skip to content

(feat): Generic Git Authentication #550

@sashokbg

Description

@sashokbg

Feature summary

Allow the user to specify any git url and provide any git auth token (ex: Gitlab)

Problem / motivation

Currently the tool only seems to work with Github private repositories.
The underlying git functions do allow to checkout any type of repository and provide authentication as a token.
I even unit-tested the clone_repo function with my private gitlab instance and it works fine.

To solve the problem I suggest the following modifications, that I am willing to implement and test if accepted.

  • Add a new env variable GIT_TOKEN allowing to specify just a token, regardless if github format or other
  • Keep the existing GITHUB_TOKEN for compatibility
  • Relax the rules for token validation (InvalidGitHubTokenError) and only check token if URL contains github.com
  • Update the documentation to mention that it now works with any repository provided you have a "token"

Please let me know what you think.
Thank you for the great tool !

Best Regards
Aleks

Proposed solution

No response

Alternatives considered

No response

Which interface would this affect?

Select one...

How important is this to you?

Select one...

Would you like to work on this feature yourself?

Select one...

Would you need support from the maintainers (if you're implementing it yourself)?

Select one...

Additional context, screenshots, or examples

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions