Getting ssh-agent to work with git run from windows command shell

后端 未结 7 1380
遥遥无期
遥遥无期 2020-12-04 07:09

I have msysgit installed, with OpenSSH. I am connecting to a gitosis repo. From the git bash, I have created a .profile file that runs ssh-agent (if not already

7条回答
  •  忘掉有多难
    2020-12-04 07:31

    On Windows 10 this worked for me

    1. run git bash
    2. touch ~/.profile
    3. start ~/.profile to open .profile
    4. add the following to .profile
    #! /bin/bash 
    eval `ssh-agent -s` 
    ssh-add ~/.ssh/*_rsa
    

    This is based on this answer. The only difference is that .bashrc did not work, instead .profile worked.

提交回复
热议问题