新安裝的git進行配置
阿新 • • 發佈:2018-12-07
配置使用者名稱和郵箱
Last login: Mon Nov 5 13:13:43 on ttys000
wujiayus-MacBook-Pro:~ wjy$ git config --global user.name 'wujy'
wujiayus-MacBook-Pro:~ wjy$ git config --global user.email '[email protected]'
生成SSHKey
wujiayus-MacBook-Pro:~ wjy$ ssh-keygen -t rsa -C "[email protected]"
中間會遇到一些,需要配置的問題,一般情況一路按回車就可以了
Generating public/private rsa key pair. Enter file in which to save the key (/Users/wjy/.ssh/id_rsa): Created directory '/Users/wjy/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/wjy/.ssh/id_rsa. Your public key has been saved in /Users/wjy/.ssh/id_rsa.pub.
配置SSHKey
切換到一下路徑
wujiayus-MacBook-Pro:~ wjy$ cd /Users/wjy/.ssh
開啟檔案
wujiayus-MacBook-Pro:.ssh wjy$ cat id_rsa.pub
將下面的內通複製到github上SSHKey的地方