您的位置:首页 > 其它

SSH-key 的相关问题

2016-07-18 21:31 239 查看


Generating an SSH key(以github在mac上为例)


Checking
for existing SSH keys

Before you generate an SSH key, you can check to see if you have any existing SSH keys.

查看你的ssh key

cd
~/.ssh && ssh-keygen


Generating
a new SSH key and adding it to the ssh-agent

After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent.

如果上一步没有的话,就要自己去生成一个ssh-key(待续)


Adding
a new SSH key to your GitHub account

To configure your GitHub account to use your new (or existing) SSH key, you'll also need to add it to your GitHub account.

粘贴上一步的ssh-key(通过如下命令,key直接出线在黏贴版中)

On OS X run: 
cat
id_rsa.pub | pbcopy

On Linux run: 
cat
id_rsa.pub | xclip

On Windows (via Cygwin/Git Bash) run: 
cat
id_rsa.pub | clip


进到github中的setting,添加你的ssh-key


Testing
your SSH connection

测试连接,以fakestmp为例

git clone git@github.com:Nilhcem/FakeSMTP.git
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: