linux 系統生產公鑰:
cd 你的項目,
git config user.name "你的username"
git config user.email "[email protected]"
ssh-keygen -t rsa -C [email protected]
cd ~/.ssh
vim id_rsa.pub
複製到gitee ,管理-部署公鑰管理,然後填寫。
回到代碼目錄敲命令:
ssh -T [email protected]
Hi martin (xxx)! You've successfully authenticated, but GITEE.COM does not provide shell access.
大概這樣的提示就ok了
添加git remote:
git remote add origin2 [email protected]:wubuze/lottery.git //選擇ssh 那個
刪除origin
git remote delete origin,
最後pull 命令改爲:
git pull origin2 master