git icon indicating copy to clipboard operation
git copied to clipboard

Setting environment variables for git executable

Open domeales-paloit opened this issue 1 year ago • 1 comments

Hi there,

Is it possible to set the environment variables for the git commands?

I would like to set GIT_SSH_COMMAND like here: https://stackoverflow.com/a/29754018

Is this possible? Can you give me any example?

Thanks, Dom

domeales-paloit avatar Oct 23 '23 02:10 domeales-paloit

Currently that's not possible within the library but would be a nice addition.

In the meantime you can use a ssh config file.

Host git.server.com
    IdentityFile ~/.ssh/git.server.private
    IdentitiesOnly yes

And then it should work

sebastianfeldmann avatar Oct 26 '23 14:10 sebastianfeldmann