Provide passphrase to git in bash script

后端 未结 1 2027
生来不讨喜
生来不讨喜 2021-01-05 12:33

How do I provide passphrase with git fetch/pull in bash script. I really need to do it in a bash script, without using ssh-add or something like that. is it possible?

1条回答
  •  攒了一身酷
    2021-01-05 13:00

    I tryed ssh-agent and solution with SSH_ASKPASS but nothing worked, then I found a solution using http://expect.sourceforge.net/

    Example(executed in shell):

    pass="passwod"
    /usr/bin/expect <

    0 讨论(0)
提交回复
热议问题