feat(ssh-git): Introduce support to pull repositories using ssh keypairs#4285
feat(ssh-git): Introduce support to pull repositories using ssh keypairs#4285leophys wants to merge 3 commits intoTabbyML:mainfrom
Conversation
|
I don't know how to ask for a review to a team member, so I am just tagging someone, @gyxlucy |
|
Hi there! 👋 |
|
add @zwpaper |
|
question to this, if this will be setup trough trough config.toml, how do we will supply the kyes? only thought environment variable, or do you plan any other way? for example storing in .ssh_keys located besides config.toml |
It's quite some time I did this, so forgive me but my memory is fuzzy. IIRC, the idea is that the keys would be stored in the database. What is missing from this PR is an API (and related frontend changes, that I mention in the description) to manage those keys. Again, IIRC, the main API of this application is graphql, and I was waiting for feedback from the team before implementing it. |
|
thanks for answer, since you can use ssh uri in config.toml, just not with the keys (or at least i have not figured out how, and there is no mention in documentation either) |
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
gitbinary and instead completely rely ongit2-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:
git2-rs)I am open for feedback/discussions. I am also keen to do the frontend work, if we agree on a final UX/UI.