sh 将SSH密钥添加到代理。此步骤也可用于避免在执行git push / pull时输入SSH密码

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 将SSH密钥添加到代理。此步骤也可用于避免在执行git push / pull时输入SSH密码相关的知识,希望对你有一定的参考价值。

# copy ssh key to ~/.ssh/id_rsa
# chmod 400  ~/.ssh/id_rsa

# To add the ssh-key to the ssh-agent, the ssh-agent must be running. 
# If the ssh-agent isn't already running, start the ssh-agent.

eval "$(ssh-agent -s)"

#Add your SSH key to the ssh-agent. If you used an existing SSH key rather than generating a new SSH key, you'll need to replace id_rsa in the command with the name of your existing private key file.

ssh-add ~/.ssh/id_rsa

# https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

以上是关于sh 将SSH密钥添加到代理。此步骤也可用于避免在执行git push / pull时输入SSH密码的主要内容,如果未能解决你的问题,请参考以下文章