File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -146,15 +146,17 @@ GitHub的SSH服务支持OpenSSH格式的公钥认证,可以通过Linux、Mac O
146146 IdentityFile ~/.ssh/gotgithub
147147
148148好了,有了上面的准备,就将\ :file: `~/.ssh/gotgithub.pub `\ 文件内容拷贝到剪切板。\
149- 在命令行用下面的命令可直接将文件内容拷贝到剪切板:
149+ 公钥是一行长长的字符串,若用编辑器打开公钥文件会折行显示,注意拷贝时切莫在其中\
150+ 插入多余的换行符、空格等,否则在公钥认证过程因为服务器端和客户端公钥不匹配而\
151+ 导致认证失败。命令行下可直接用\ ``pbcopy ``\ 命令\ [# ]_\ 将文件内容拷贝到剪切板\
152+ 以避免拷贝错误:
150153
151154::
152155
153156 $ cat ~/.ssh/gotgithub.pub | pbcopy
154157
155158
156159然后将公钥文件中的内容粘贴到GitHub的SSH公钥管理的对话框中,如图2-8所示。\
157- 注意要忠实地拷贝公钥的内容,切莫在其中插入多余的换行符、空格而导致认证失败。
158160
159161.. figure :: /images/join-github/setting-ssh-gotgithub.png
160162 :scale: 100
@@ -196,4 +198,14 @@ GitHub的SSH服务支持OpenSSH格式的公钥认证,可以通过Linux、Mac O
196198
197199.. _gravatar.com : http://gravatar.com/
198200
201+ ----
202+
199203.. [# ] https://github.com/blog/1007-skinny-header
204+ .. [# ] Mac下的命令行工具\ ``pbcopy ``\ 和\ ``pbpaste ``\ 可以在命令行下操作剪贴板,\
205+ Linux下的命令行工具\ ``xsel ``\ 亦可实现类似功能。在Linux下可以创建别名用\
206+ ``xsel ``\ 命令来模拟\ ``pbcopy ``\ 和\ ``pbpaste `` \。
207+
208+ ::
209+
210+ alias pbcopy='xsel --input'
211+ alias pbpaste='xsel --output'
You can’t perform that action at this time.
0 commit comments