How to run ssh-add on windows?

后端 未结 7 541
夕颜
夕颜 2020-11-29 16:22

I\'m following #335 Deploying to a VPS , and near the end of the episode, we need to run ssh-add to give server access to github repo.

The problem is ho

相关标签:
7条回答
  • 2020-11-29 17:25

    One could install Git for Windows and subsequently run ssh-add:

    Step 3: Add your key to the ssh-agent

    To configure the ssh-agent program to use your SSH key:

    If you have GitHub for Windows installed, you can use it to clone repositories and not deal with SSH keys. It also comes with the Git Bash tool, which is the preferred way of running git commands on Windows.

    1. Ensure ssh-agent is enabled:

      • If you are using Git Bash, turn on ssh-agent:

        # start the ssh-agent in the background
        ssh-agent -s
        # Agent pid 59566
        
      • If you are using another terminal prompt, such as msysgit, turn on ssh-agent:

        # start the ssh-agent in the background
        eval $(ssh-agent -s)
        # Agent pid 59566
        
    2. Add your SSH key to the ssh-agent:

      ssh-add ~/.ssh/id_rsa
      
    0 讨论(0)
提交回复
热议问题