linux配置github

安裝git
apt-get install git
查看git 版本
git version

配置ssh
git config –global user.name “xxxxxx”
git config –global user.email “[email protected]

命令 git config –list,查看是否設置成功。
生成ssh
ssh-keygen -C ‘[email protected]’ -t rsa
一直回車(中途選擇不輸入密碼)
(me is data)
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:XHfnbJG0ZBDx8LG9PoDI5flB2M1UvprGG+GvjJ3y4u8 [email protected]
The key’s randomart image is:

這返回來到顯示數據放在根目錄下來然後去根目錄下找(每個人也許返回到位置都不一樣呢)
到/root/.ssh下 copy id_rsa.pub
cd /root/.ssh
ls -a 顯示隱藏文件
gedit id_rsa.pub
copy出data

進入你自己的github,進入Settings->SSH and GPG keys->New SSH key,然後在Key那

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章