github 创建密匙怎么设置密码
答案:2 悬赏:80 手机版
解决时间 2021-02-03 12:57
- 提问者网友:蔚蓝的太阳
- 2021-02-02 22:07
github 创建密匙怎么设置密码
最佳答案
- 五星知识达人网友:西风乍起
- 2021-02-02 23:09
一、创建SSH KEY
1. 打开git bash
2. 输入
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
3. 默认路径即可,回车
$ Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
4. 创建密码,并重复输入
$ Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same
$ passphrase again: [Type passphrase again]
二、将SSH key添加到 ssh-agent
1. 测试ssh-agent是否能用
eval "$(ssh-agent -s)"
Agent pid 59566
2. 将SSH key添加到 ssh-agent
$ ssh-add ~/.ssh/id_rsa
3. 将SSH key添加到 GIThub https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
1)settings
2)SSH and GPG keys.
3)点击 New SSH key.
4)title随便取个名字
5)将C:\Users\xx\.ssh下面的 id_rsa.pub 文件的内容粘贴过来
三、测试是否能用
打开Git Bash,输入 ssh -T git@github.com
$ ssh -T git@github.com
Enter passphrase for key '/c/Users/flyer/.ssh/id_rsa':
Hi XX! You've successfully authenticated, but GitHub does not provide shell access.
1. 打开git bash
2. 输入
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
3. 默认路径即可,回车
$ Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
4. 创建密码,并重复输入
$ Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same
$ passphrase again: [Type passphrase again]
二、将SSH key添加到 ssh-agent
1. 测试ssh-agent是否能用
eval "$(ssh-agent -s)"
Agent pid 59566
2. 将SSH key添加到 ssh-agent
$ ssh-add ~/.ssh/id_rsa
3. 将SSH key添加到 GIThub https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
1)settings
2)SSH and GPG keys.
3)点击 New SSH key.
4)title随便取个名字
5)将C:\Users\xx\.ssh下面的 id_rsa.pub 文件的内容粘贴过来
三、测试是否能用
打开Git Bash,输入 ssh -T git@github.com
$ ssh -T git@github.com
Enter passphrase for key '/c/Users/flyer/.ssh/id_rsa':
Hi XX! You've successfully authenticated, but GitHub does not provide shell access.
全部回答
- 1楼网友:woshuo
- 2021-02-02 23:37
我。。知。。道
加。。我。。私。。聊
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯