Skip to content

Conversation

@leophys
Copy link

@leophys leophys commented Jun 13, 2025

Hi folks! I love what you are building and wanted to contribute back. I see a use case where someone (me?) would like to pull private repositories. As of now, this is supported only for forges which accept authentication mechanisms through HTTP. I wanted to support pulling via ssh using ssh keys.

Doing so, I also refactored the code to drop invoking the git binary and instead completely rely on git2-rs, which is already a dependency you were pulling in.

Currently, this PR only includes the backend work. There is also the need for a UI change to make this available for end users, and here I stopped. I did because I understand this is a product, and you might want to have a discussion (open or not) on how (whether) to expose this feature to the users.

I designed the change to allow both keys stored in files and as text in the database. This seemed like a sensible and easy thing to do.

There are three new tests:

  • one to test pulling a public repository using the new code path (that leverages only git2-rs)
  • two more to try and pull private repository either providing a path to a private key or the private key itself via env variables (these are skipped if the needed environment variables are not set)

I am open for feedback/discussions. I am also keen to do the frontend work, if we agree on a final UX/UI.

@leophys
Copy link
Author

leophys commented Jun 13, 2025

I don't know how to ask for a review to a team member, so I am just tagging someone, @gyxlucy

@leophys leophys changed the title Introduce support to pull repositories using ssh keypairs feat(ssh-git): Introduce support to pull repositories using ssh keypairs Jun 13, 2025
@leophys
Copy link
Author

leophys commented Jun 26, 2025

Hi there! 👋
Is there any bandwidth to deal with this? I would really like to add this feature 🙏

@wsxiaoys
Copy link
Member

add @zwpaper

@wsxiaoys wsxiaoys requested a review from zwpaper June 26, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants