「之岙」

「之岙」

如何為Github添加ssh

前置#

終端 git、ssh-keygen 命令正常使用

檢查系統內是否已經有 ssh 密鑰#

Linux、MacOS 終端執行:

ls ~/.ssh
git 全局配置#
git config --global user.name 你的用戶名

舉例:git config --global user.name zhiao

git config --global user.email 你的郵箱

舉例:git config --global user.email [email protected]

生成秘鑰#
ssh-keygen -t rsa -C '你上面git配置的郵箱'

舉例:ssh-keygen -t rsa -C '[email protected]'

將公鑰貼上至 Github#

github-> 右上角頭像 ->setting->SSH and GPG keys->New SSH key

  1. 起個 Title
  2. 終端進入~/.ssh 目錄,將.pub 結尾的文件內容貼上到 Key 中
  3. Add SSH key
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。