Skip to content

Signing Git Commits with SSH Key doesn't work with SSH Agent on Windows #4726

Answered by EDMPhoenix
QuAzI asked this question in Q&A
Discussion options

You must be logged in to vote

I understand your point, sorry for misunderstanding your use case. In that case, try the following:

You will need to let Git know where the SSH_AUTH_SOCK is. On Windows, this should be a named pipe that you can connect to, but Git Bash is a POSIX environment and the SSH client expects a UNIX domain socket.

You can use npiperelay to create a link between the UNIX domain socket that Git Bash / Mingw64 can understand, and the named pipe that ssh-pageant (or any Pageant compatible agent) provides.

Here are the basics steps:

  1. Download npiperelay (or compile it using go get github.com/jstarks/npiperelay)

  2. Create a script named start_agent in ~/bin/ or /usr/bin/ :

#!/bin/sh
export SSH_AUTH_S…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@QuAzI
Comment options

Comment options

You must be logged in to vote
4 replies
@QuAzI
Comment options

@EDMPhoenix
Comment options

@QuAzI
Comment options

@EDMPhoenix
Comment options

Answer selected by QuAzI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #4725 on December 02, 2023 10:34.