How to use git in project qube when using Split SSH

I have successfully setup Split SSH as documented here

My next step would be to begin using it when committing and pushing code.
I am not sure how this would look.

On a non-Qubes machine, I used to do the following:

$ eval "$(ssh-agent -s)" && ssh-add ~/path/to/key && git push -u origin HEAD

So if I have an App Qube where I’ve installed all the code dependencies of discourse as an example, should I repeat the same steps and swap the ssh-client qube for where the code repository (discourse-qube in this case) or is there a way to configure git behaviour in the discourse-qube to use the ssh-client qube for git operations?

I have searched the forum but I haven’t seen a thread answering my question or with clues that I could use to refine my question further. I saw this recommendation for Split GPG but not sure if it applies to SSH as well.

Unless I’m misunderstanding what you’re saying, I think you’ve got it right: if you want discourse-qube to use split-SSH, you need to make sure it’s configured as an “SSH client”.

Once that done, there isn’t anything special to do for Git, it just works. (That’s because Git interfaces with the SSH agent as usual, and the agent deals with split-SSH.)

1 Like

You need to configure policy for your discourse-qube e.g.:

qubes.SshAgent * discourse-qube vault-test ask target=vault-test
1 Like

Yes I think you understood; it’s me that didn’t phrase the question well :see_no_evil:
Have edited it to reflect that.

Both replies here and here are the solution; with one explaining how Split SSH would work with Git and the other specifying how the policy would look.

1 Like